All Questions

338
votes
4answers
171232 views

Insert code into the page context using a content script

I'm learning how to create Chrome extensions. I just started developing one to catch YouTube events. I want to use it with YouTube flash player (later I will try to make it compatible with HTML5). ma...
311
votes
5answers
215783 views

Is there a JavaScript/jQuery DOM change listener?

Essentially I want to have a script execute when the contents of a DIV change. Since the scripts are separate (content script in chrome extension & webpage script), I need a way simply observe cha...
119
votes
3answers
37102 views

Chrome Extension Message passing: response not sent

I am trying to pass messages between content script and the extension Here is what I have in content-script chrome.runtime.sendMessage({type: "getUrls"}, function(response) { console.log(response)...
125
votes
4answers
49723 views

Where to read console messages from background.js in a Chrome extension?

I just started out with Google Chrome extensions and I can't seem to log to console from my background js. When an error occurs (because of a syntax error, for example), I can't find any error message...
42
votes
3answers
58166 views

onClick within Chrome Extension not working

This seems to be the easiest thing to do, but it's just not working. In a normal browser the .html and .js files works perfectly, but in the Chrome extension the onClick function is not performing wha...
5
votes
3answers
1221 views

Google Chrome / Firefox do not see extension output in console

I am trying to test sample code for web extension for browsers. But, it doesn't work. I checked the console for Google Chrome and also for Firefox. It doesn't print anything. The following is my code:...
18
votes
2answers
25778 views

The Chrome extension popup is not working, click events are not handled

I have created a JavaScript variable and when I click on the button it should increment by 1, but its not happening. Here's manifest.json. { "name":"Facebook", "version":"1.0", "description":"...
282
votes
8answers
342683 views

Chrome sendrequest error: TypeError: Converting circular structure to JSON

I've got the following... chrome.extension.sendRequest({ req: "getDocument", docu: pagedoc, name: 'name' }, function(response){ var efjs = response.reply; }); which calls the following.. c...
15
votes
1answers
12945 views

After calling chrome.tabs.query, the results are not available

I'm creating (learning) an extension for Google Chrome. To debug some code, I inserted console.log(), as follows: var fourmTabs = new Array(); chrome.tabs.query({}, function (tabs) { for (var i ...
25
votes
2answers
16301 views

Pass a parameter to a content script injected using chrome.tabs.executeScript()

How can I pass a parameter to the JavaScript in a content script file which is injected using: chrome.tabs.executeScript(tab.id, {file: "content.js"});

Previous Next