Questions tagged [google-chrome-extension]

1

votes
2

answer
75

Views

Binding extension content scripts to Chrome's start page?

Is there any way to bind a content script to Chrome's start page? I tried setting matches to "*", but it doesn't even run. With "*://*/*" it does not bind.
Flash Thunder
1

votes
1

answer
470

Views

Chrome extension i18n getMessage from specific locale

is there a way to ask for i18n messages of a specific locale using JS please? I'm working on an extension for Youtube, and in Youtube site the user can change the site language, so even if the user's browser is in English, the user able to view the site in Japanese for example. In a case like that...
Gil Goldshlager
1

votes
1

answer
788

Views

Google chrome - Extensions being automatically removed

I was trying to pack an little extension i made, but chrome keeps removing it as it may have been "installed without my consent". Is there any way to stop this? Thanks! Note: This is not a duplicate from this question , as my extension is not yet in the chrome store.
SergSoftwares
0

votes
1

answer
12

Views

clicking a button in javascript without button id

I am attempting to automate a button click on a website. The only problem is, the HTML for the button looks like this (please note that this is not the exact button I am trying to click, it is just a real example of what a lot of buttons look like): Continue Obviously, there is no ID for this butt...
Louis
0

votes
0

answer
4

Views

chrome.windows.create() no longer seems to honor width parameter (windows)

until recently chrome.windows.create() properly opened the window to the requested width but no longer seems to do so. now, (only on windows platform) the following chrome.windows.create( { "url" : fireflyURL+"?portname="+this.pathname...
Chrys G
0

votes
0

answer
5

Views

Get Value from Chrome Extension Popup to Print in Website Textbox

Trying to get value of textbox 'name_textbox' in chrome extension popup to content_script.js popup.js document.addEventListener('DOMContentLoaded', docLoad , false); function injectTheScript() { textIn=document.getElementById('name_textbox'); chrome.tabs.query({active: true, currentWindow: true}, f...
Seb Tota
3

votes
2

answer
169

Views

Why is my XMLHttpRequest getting a robots.txt response

I'm writing a personal Chrome extension (Note: these can make cross-origin requests. See https://developer.chrome.com/extensions/xhr). I'm trying to use XMLHttpRequest to access a certain website, then extract data from it using javascript. My problem is that this website often returns its "robots"...
adn bps
1

votes
2

answer
1.7k

Views

Enable Google API for “googleapis.com/auth/userinfo”

I am developing a Google Chrome Extension. I would like to be able to access the user profile info, using the data from these endpoints: https://www.googleapis.com/auth/userinfo https://www.googleapis.com/oauth2/v1/userinfo I don't seem to have access to these resources. From my web searches, it lo...
Alexander Mills
5

votes
0

answer
21

Views

How does it send slight different emails to multiple recipients, though having them in common 'to' section?

So I was trying mixmax - the chrome extension and got to know it tracks email open event even though the same mail is sent to multiple recipients and it is able to identify receivers properly. I checked and found that it adds different pixel URLs for all receivers, mail looks same (that's not my con...
Karan Shah
1

votes
2

answer
543

Views

Change navigator in browser to pretend, that plugin is installed (with javascript)

I am trying to do Chrome extension, that will pretend, that some plugins are installed. I was trying to edit navigator.plugins, but these properties are read-only. I can add new item navigator.plugins[x], but I do not know, how to create new (Plugin, PluginArray or MimeType) objects in navigator.plu...
MartySK
0

votes
0

answer
5

Views

Chrome Extension Dev: How to pass variable from inspectedWindow to devtools panel.js using Eval

I'm building a devtools chrome extension pane and for what I'm doing I need to pass an anchor's href value from the DOM of the inspected page to my pane.js file's context. I thought the way to go was to use chrome.devtools.inspectedWindow.eval I used the example code that detects the version of jque...
TheWebTech
1

votes
1

answer
532

Views

Run content script loop only when tab is active

I am working on a chrome extension that uses content scripts to runs a loop. The tasks ran in the loop can consume quite some memory, and when having a lot of open tabs it impacts on the browser performance. I am looking to run the loop only when the tab is active. I am using onMessage.addListener m...
Mark
1

votes
2

answer
1.8k

Views

Keep Chrome Extension running on page reload

I'm trying to build a simple chrome extension that inserts/hides a div when the browser action (extension icon) is toggled. I've got the basics working but I would like the extension to remain in it's 'on-state' (i.e div inserted) when the page reloads. It should only be removed when toggled off. Cu...
shanomurphy
1

votes
1

answer
499

Views

How to load custom chrome extension using selenium web driver in ruby?

Is there any way that I could load custom chrome extension(is actually a folder of js files) when I execute selenium web driver?.
esakiraja
1

votes
1

answer
70

Views

Submitted Chrome extension: “manifest is invalid” on download

I recently submitted a chrome extension, but when I try to download the extension it says that the manifest file is invalid. Not sure why. Here is my manifest : { "name": "My chrome extension", "version": "0.2", "description": "My chrome extension description.", "permissions": [ "activeTab", "tabs",...
Jibus
1

votes
2

answer
4.4k

Views

Chrome extension / web app session control

I am creating a chrome extension, rather a chrome webapp. This application just contains the html, js, image and css files. The application connects to a server to fetch data. I chose to do this as it would reduce the amount of files downloaded by the user. Using Backbone.js I have an MVC architectu...
satran
10

votes
1

answer
146

Views

How to programmatically add a guest attendee to GSuite calendar event on Save

I am building a GSuite Calendar extension. My extension adds custom information to the description of the new event and needs to systematically add the same guest email e.g. [email protected] I am able to inject into the description, but how can I add a guest programmatically without any user inte...
zabumba
0

votes
0

answer
9

Views

Refused to evaluate a string as Javascript in chrome extension, in pdfjs

I am working on a chrome extension which uses PDFJS, but PDFJS latest release have some javascript which is returning JS as string Function("return this")() which is not allowed in chrome extension. so it giving following error Uncaught EvalError: Refused to evaluate a string as JavaScript because '...
Haris Jamil
1

votes
2

answer
7.9k

Views

Javascript Floating div that always ontop when scrolls down

What is the right way to build simple floating divs using Javascript (or CSS programmatically) that is on top and always visible when scrolling down? Now I've seen examples like this. When you scroll down you see the div jumping and a delay. I want it to constantly be on top when the content of the...
user63898
1

votes
1

answer
978

Views

Chrome extensions how to access a global variable set in a script

I have this in a chrome extension pulled in js file. function App() { alert(1) } When I right click -> show console and try to fire the method the method App is not defined. Why ? Something wrong here?
momo
1

votes
2

answer
2.3k

Views

Windows installer for chrome extension

I have just created an extension that is to be installed on chrome for video chat. I would like to bundle it with the software that I am providing. How can I create an installer that allows me to do this. The application is written in java and the chrome extension in the html, js, css code. I also h...
Vish
1

votes
2

answer
3.6k

Views

Chrome Extensions: You do not have permission to use blocking webRequest listeners

I am writing an extension and have this call in my background page: chrome.webRequest.onBeforeRequest.addListener(function(details) {console.log(details)}, {urls: [""]}, ["blocking"]); However whenever I run it I get this error in the dev tools for the background page: Error during webRequestInterna...
Robeezy
1

votes
1

answer
1.9k

Views

Not receiving any data from webpage to content.js of chrome extension

I am trying to send a message from a button click even on my website which is opened in a tab by chrome extension. But, I'm not able to get any message from the webpage and I get a port error. My content.js: var port = chrome.extension.connect(); port.onMessage.addEventListener("message", function...
Hick
1

votes
1

answer
1.1k

Views

How to allow Remote Script from every web site with Content Security Policy -CSP?

I read about Content Security Policy from: http://developer.chrome.com/extensions/contentSecurityPolicy.html It is mentioned there that: "If you have a need for some external JavaScript or object resources, you can relax the policy to a limited extent by whitelisting secure origins from which script...
Gorden Gram
1

votes
2

answer
1k

Views

Popup won't show up on first click

I'm trying to show a popup when a user clicks on the icon. The popup should only show up when the url doesn't contain "chrome://" or "about:". That works well. But on a normal page, the popup only appears when I click on the icon for the second time. Nothing happens on the first click. Here's the co...
vivek
1

votes
1

answer
510

Views

How to make a website load *slower* on browser?

For some users acceptance test, we need to write a chrome extension that will make specific sites (i.e, www.cnn.com, and so forth) load slower - kind of imitating a slow internet connection. Any idea on how to approach this problem?
Yossale
1

votes
1

answer
1.1k

Views

$(document).ajaxComplete doesn't fire inside of content script

I'm working on a Google Chrome extension to offer some additional functionality to a website I frequent, which has me trying to make a script run again if ever an AJAX request is successful. This is necessary due to the nature of the site. Moving on: what I want to do is, simply put, to trigger a f...
tesc
1

votes
1

answer
1.2k

Views

Message passing in Chrome Extension

I am quite confused about the what are counted as chrome extension view, which directly linked to what function I can use for passing messages between different components. Let me just describe what I am trying to do first; My background.html creates Desktop Notifications based on some events receiv...
h0cked
1

votes
1

answer
3.8k

Views

Create new window and insert dynamic content in Chrome Extension

I'm having trouble creating a new window and adding content from my extension. Since I can't call window.open from my script without losing a reference to my new window, I'm forced to use chrome.windows.create. Essentially what I want is this: var newWindow = window.open(); newWindow.document.writel...
Omar Stewey
1

votes
2

answer
1.6k

Views

How to include a link in a Webkit notification?

I am creating a Chrome extension and I am using the Webkit notifications API. I need to show a link in the notification, but the problem is that now Webkit HTML notifications are deprecated, so I only can use notifications with a simple message. I mean, one year ago I could have created a Wbkit HTML...
user2047330
1

votes
2

answer
948

Views

How do I adjust my chrome extension's manifest.json's “matches” key dynamically by pulling its value from an external source (database)?

I'm trying to create a chrome extension and I'd like to only allow my content_scripts to be run only when the user access certain pages. Hard-coding the webpages where it can be accessed doesn't seem to be the proper practice. How can I modify my manifest.json script to pull the content_script "matc...
David C
0

votes
1

answer
42

Views

Remove dynamically created elements by class name Javascript

So, in plain terms I am creating a Chrome Extension that so far can only save links from the internet but not delete them. What I want to add is a "remove" button for deleting unwanted links. So far I haven't got that to work. The buttons I want to remove are added using JavaScript. Each new block o...
muhammad amer
1

votes
1

answer
45

Views

Update function when page changes?

I'm working on a chrome extension for twitter and the only issue I'm running into is that when you scroll down on twitter, it adds to the page right? Well I need my jquery function to be updated when that happens, or else the click function isn't going to work on the newly loaded tweets.
Zachrip
1

votes
1

answer
1k

Views

How to create a match pattern for a title

I am trying to use the chrome.tabs.query for a title. However, if I look at the documentation, it appears that match patterns only work with URLs? Every type of pattern that I try does not work Here is the code: chrome.tabs.query({'title':searchText}, function(tabArray){ tabbr.update(tabArray); });
Justin Pihony
1

votes
2

answer
1.2k

Views

Chrome UDP socket server sendTo other hosts than localhost returns -109 error code

I'm using the chrome network API to open an UDP socket that should both listen and send data (server and client). That's why i'm using the server way with bind/sendTo/recvFrom. However, I am not able to send data to other hosts than local hosts: see my example below. The code error -109 corresponds...
alexstrat
1

votes
1

answer
2.6k

Views

Chrome extension regarding injected script + localstorage

I am puzzling my way through my first 'putting it all together' Chrome extension, I'll describe what I am trying to do and then how I have been going about it with some script excerpts: I have an options.html page and an options.js script that lets the user set a url in a textfield -- this gets stor...
user2255700
1

votes
3

answer
1.4k

Views

how to pass variable to global scope

Question - how to pass variable to global scope? : var global_variable; chrome.storage.local.get('ABC',function(result){ global_variable = result; //pass result to global var. }); console.log(global_variable); //outputs undefined, why!!!?
John985
1

votes
1

answer
2.3k

Views

True mobile screen emulator ?

I have this page : http://people.opera.com/andreasb/viewport/ex01.html Which uses viewport for different mobile screen sizes. When I run this at my iphone I do see the font changes : But when I use Ripple or other chrome extensions (which I found) , it doesnt show me the increased font size. only...
Royi Namir
1

votes
1

answer
330

Views

Capture HTTP Status 300 for redirect download links

I'm developing a Chrome Extension to download links on a webpage. I came across some links there were not a direct download, for example like this one http://downloads.sourceforge.net/sevenzip/7z920-x64.msi When I trace the link on fiddler, I'm getting HTTP Status 302 (which is a redirect). So I'm t...
Eric
1

votes
2

answer
310

Views

chrome.contextMenus exclude URL?

Im using chrome.contextMenus documentUrlPatterns to filter where to show the context menu. I tried prepending '-' to the patterns but that doesnt change anything... function recreateStuff(){ if(logoncmid!=-1){} var hosts=[]; var ihosts=[]; for (var i = savedData.length - 1; i >= 0; i--) { hosts.push...
n00b

View additional questions