Questions tagged [google-chrome-extension]
Extension development for the Google Chrome web browser. You write them using web technologies such as HTML, JavaScript, and CSS.
29,330
questions
615
votes
6
answers
381k
views
Access variables and functions defined in 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).
...
602
votes
18
answers
1.0m
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..
...
511
votes
15
answers
603k
views
Getting "net::ERR_BLOCKED_BY_CLIENT" error on some AJAX calls
Recently I've realised that, some adblocker extensions (such as adBlocker plus) block some Ajax calls. I get that error on the console:
GET http://localhost/prj/conn.php?q=users/list/ net::...
485
votes
27
answers
510k
views
How to wait until an element exists?
I'm working on an Extension in Chrome, and I'm wondering: what's the best way to find out when an element comes into existence? Using plain javascript, with an interval that checks until an element ...
464
votes
5
answers
355k
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 the Chrome extension & webpage script), I need a way simply observe ...
358
votes
21
answers
1.0m
views
Error message "DevTools failed to load SourceMap: Could not load content for chrome-extension://..."
I'm trying to display an image selected from the local machine and I need the location of that image for a JavaScript function. But I'm unable to get the location.
To get the image location, I tried ...
349
votes
31
answers
111k
views
How do I auto-reload a Chrome extension I'm developing?
I'd like for my chrome extension to reload every time I save a file in the extension folder, without having to explicitly click "reload" in chrome://extensions/. Is this possible?
Edit: I'm aware I ...
285
votes
5
answers
230k
views
Google Chromecast sender error if Chromecast extension is not installed or using incognito
I'm having an error running Chromecast sender in Chrome Incognito or if Chromecast extension is not installed:
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://...
265
votes
11
answers
287k
views
How can I get the URL of the current tab from a Google Chrome extension?
I'm having fun with Google Chrome extension, and I just want to know how can I store the URL of the current tab in a variable?
250
votes
13
answers
202k
views
google chrome extension :: console.log() from background page?
If I call console.log('something'); from the popup page, or any script included off that it works fine.
However as the background page is not directly run off the popup page it is not included in the ...
230
votes
9
answers
129k
views
Accessing console and devtools of extension's background.js
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 ...
221
votes
11
answers
261k
views
How to save CSS changes of Styles panel of Chrome Developer Tools?
How to save CSS changes of Styles panel of Google Chrome Developer Tools?
At tool's website it's mentioned that we can see all change in resource panel
But I'm working locally on a CSS file but ...
214
votes
12
answers
163k
views
Simulate limited bandwidth from within Chrome?
Is there a way I can simulate various connection speeds from within Chrome?
I need to be able to check http://localhost with varying speeds.
I know there are standalone applications that can do this,...
210
votes
8
answers
468k
views
Where does Chrome store extensions?
I looked in:
C:\Documents and Settings\username\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions
for unpacked extensions, but that folder is empty for me.
For newer ...
192
votes
6
answers
103k
views
AngularJS changes URLs to "unsafe:" in extension page
I am trying to use Angular with a list of apps, and each one is a link to see an app in more detail (apps/app.id):
<a id="{{app.id}}" href="apps/{{app.id}}" >{{app.name}}</a>
Every time ...
188
votes
4
answers
157k
views
Chrome extension: accessing localStorage in content script
I have an options page where the user can define certain options and it saves it in localStorage: options.html
Now, I also have a content script that needs to get the options that were defined in the ...
186
votes
7
answers
56k
views
How to test chrome extensions?
Is there a good way to do this? I'm writing an extension that interacts with a website as a content script and saves data using localstorage. Are there any tools, frameworks, etc. that I can use to ...
185
votes
9
answers
270k
views
How to change the locale in chrome browser
I want to change Accept-language request header to anything I wanted in chrome, is there any extension or plugin where I can do it. I want to be able to change locale and language both. Main ...
180
votes
7
answers
22k
views
Is it possible to hide extension resources in the Chrome web inspector network tab?
When I'm viewing the downloaded resources for a page in the Chrome web inspector, I also see the HTML/JS/CSS requested by certain extensions.
In the example above, indicator.html, indicator.js and ...
171
votes
20
answers
179k
views
Disable developer mode extensions pop up in Chrome
Since the latest release of chrome (34.0.1847.116) last week, I have been receiving the “Disable developer mode extensions" when running automated tests using watir-webdriver.
This seems to be the ...
167
votes
3
answers
61k
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)
...
164
votes
6
answers
110k
views
Chrome developer tools: View Console and Sources views in separate views/vertically tiled?
Chrome developer tools: Is there a way to view the Console tab and the Sources tab in separate views? I often want to look at both of these simultaneously.
Pressing Esc when on the Sources tab will ...
164
votes
5
answers
99k
views
Using ECMAScript 6
I'm looking for a way to run ECMAScript 6 code in my browser's console but most browsers don't support functionality that I'm looking for. For example Firefox is the only browser that supports arrow ...
162
votes
5
answers
252k
views
Chrome Extension - Get DOM content
I'm trying to access the activeTab DOM content from my popup. Here is my manifest:
{
"manifest_version": 2,
"name": "Test",
"description": "Test script",
"version": "0.1",
"permissions": [...
162
votes
7
answers
150k
views
How to use jQuery in chrome extension?
I am writing a chrome extension. And I want to use jQuery in my extension. I am not using any background page, just a background script.
Here are my files :
manifest.json
{
"manifest_version": ...
157
votes
4
answers
38k
views
How do I use WebStorm for Chrome Extension Development?
I just bought WebStorm 5 and so far have been really enjoying its Inspection features. One hitch I've run in to when developing my Chrome extension is that it doesn't recognize the chrome variable:
...
155
votes
9
answers
162k
views
Reading response headers with Fetch API
I'm in a Google Chrome extension with permissions for "*://*/*" and I'm trying to make the switch from XMLHttpRequest to the Fetch API.
The extension stores user-input login data that used ...
146
votes
6
answers
215k
views
Where to find extensions installed folder for Google Chrome on Mac?
I can not find them under ~/Library/Application Support/Google/Chrome/; Where are they?
Mac Pro 10.8.4
Chrome Version 26.0.1410.65
139
votes
1
answer
53k
views
Chrome extension: force popup.html to close
I'm wondering is there anyway I can force popup.html to close?
135
votes
19
answers
151k
views
Check whether user has a Chrome extension installed
I am in the process of building a Chrome extension, and for the whole thing to work the way I would like it to, I need an external JavaScript script to be able to detect if a user has my extension ...
132
votes
3
answers
308k
views
Checkbox Check Event Listener
Recently I have been working with the Chrome Plugin API and I am looking to develop a plugin which will make life easier for me for managing a website.
Now what I wish to do is to fire an event when ...
131
votes
12
answers
70k
views
How to import ES6 modules in content script for Chrome Extension
In Chrome 61, support for modules in JavaScript was added. Right now I am running Chrome 63.
I am trying to use import/export syntax in Chrome extension content script to use modules.
In manifest....
125
votes
7
answers
266k
views
Refused to apply inline style because it violates the following Content Security Policy directive
So, in about 1 hour my extensions failed hard.
I was doing my extension and it was doing what I pretended. I made some changes, and as I didnt liked I deleted them, and now my extension is throwing ...
123
votes
3
answers
114k
views
Chrome Extension how to send data from content script to popup.html
I know this this has been asked in numerous posts but honestly I don't get them. I am new to JavaScript, Chrome Extensions and everything and I have this class assignment.
So I need to make a plugin ...
122
votes
4
answers
44k
views
Detect Chrome extension first run / update
How can an extension find out that it is being run for the first time or has just been updated, so that the extension can perform some specific actions? (e.g. open a help page or update settings)
117
votes
10
answers
151k
views
Modify HTTP responses from a Chrome extension
Is it possible to create a Chrome extension that modifies HTTP response bodies?
I have looked in the Chrome Extension APIs, but I haven't found anything to do this.
116
votes
4
answers
162k
views
Chrome Extension: Make it run every page load
I want to make a chrome extension that executes some scripts after one page is loaded, I am not sure whether I have to implement this logic on the background page or it can be anywhere else, any help ...
114
votes
6
answers
112k
views
sendMessage from extension background or popup to content script doesn't work
I know that question has been repeatedly asked in different ways, but I tried to go through all the answers (hopefully I didn't miss anyone) and none of them worked for me.
Here is my extension's ...
112
votes
12
answers
61k
views
Google Chrome Extensions - Can't load local images with CSS
I have a simple Chrome extension that uses the content script feature to modify a website. More specifically, the background-image of said website.
For some reason I can't seem to be able to use ...
111
votes
7
answers
51k
views
How do I view the storage of a Chrome Extension I've installed?
It seems like it should be possible to view the localStorage/chrome.storage of Chrome Extensions installed on my browser. I've played around with the Developer Tools a bit, but haven't found a way to ...
109
votes
14
answers
64k
views
Export CSS changes from inspector (webkit, firebug, etc)
When I'm working with CSS, I'll often test in a browser - say, Chrome - right click an element, click Inspect Element, and edit the CSS right there. The use of arrow keys to change things like margin ...
108
votes
7
answers
59k
views
Can I programmatically open the devtools from a Google Chrome extension?
I have a chrome extension which hooks into the devtools. Ideally I want a badge that, when clicked, opens up the devtools on the new tab which I created. Is there any way to do this from the ...
106
votes
16
answers
417k
views
Download content video from video stream with a path of .TS or .m3u8 file through actual code so i can make chrome extension [closed]
Videos on most sites make use of progressive downloading, which means that the video is downloaded to my computer, and easy to trace. There are lots of extensions out there to do this, and even in the ...
106
votes
13
answers
142k
views
How to download a CRX file from the Chrome web store for a given ID? [closed]
I'd like to download the .crx file of an extension from webstore, I use fiddler to analyze the network request when I install an extension from webstore and got it.
For example, for the extension: ...
105
votes
2
answers
96k
views
How can I save information locally in my chrome extension?
I want my chrome extension to save some information, and I'm not sure how to start the code...
I need it to save strings.
For example - The user inputs a string (In a text area over the popup) and ...
103
votes
7
answers
81k
views
Run script each time Chrome extension icon clicked
How do I write a chrome extension such that every time a user clicks the icon, my script is run but no popup is opened? (I would look this up in the docs myself but for whatever reason they suddenly ...
100
votes
4
answers
138k
views
Chrome extension: How to open a link in new tab?
In my Stackoverflow folder, I have stackoverflow.ico and 2 bellow files. When importing it to Chrome, it shows the icon in address bar, but when I click on it, Chrome doesn't open any new tab. What am ...
99
votes
2
answers
133k
views
Getting the source HTML of the current page from chrome extension
I have a chrome extension. I need to analyse from the HTML source of the current page. I found here all kinds of solutions with background pages and content scripts but none helped me. here is what I ...
98
votes
7
answers
123k
views
Custom protocol handler in chrome
How do i set up a custom protocol handler in chrome? Something like:
myprotocol://testfile
I would need this to send a request to http://example.com?query=testfile, then send the httpresponse to my ...
93
votes
2
answers
33k
views
How often do Chrome extensions automatically update? [closed]
When I push a new version of a Chrome extension to the Chrome Web Store, how long will it take for the updated version to reach current users?
I pushed an update about six hours ago, but the ...