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.

This tag is dedicated to questions about extension development for the Google Chrome web browser.

The Chrome extension API is documented here.

Absolute beginners should start here.

A good tutorial video by official Google Developers is available on YouTube

Overview of extension architecture can be read here.

The What's New page lists some of the recent changes to the extension APIs, while the Official Chrome Releases Blog announces new releases of Chrome and Chrome OS. For general updates on the browser, visit the Official Chrome Blog.

Troubleshooting

Before posting a question, make sure that you've read the API documentation. If some methods are not documented, it may be because they are deprecated.

If necessary, include relevant parts of your manifest.json file in the question.

A common source of errors is the misunderstanding of manifest version 2 and Content Security policy (CSP). Read the documentation for the CSP to see if it answers to your question.

For anything not related to development of Chrome extensions, such as issues with publishing in the Chrome Web Store, browse the Chromium-extensions Google group (now read-only). Extension authors with questions about the Chrome Web Store can contact the cws-developer-support team at https://support.google.com/chrome_webstore/contact/developer_support/.

Migration to Manifest Version 3

Manifest version 3 is now in support since chrome 88, and will be allowed on the chrome webstore on January 2021. It is recommended to read how to migrate from v2 to v3 and an overview of the new features are found here.

29271 questions
8
votes
1 answer

Chrome Extension Config Proxy UserName and Password

I am creating a chrome extension for changing proxy settings dynamically. But in "chrome.proxy.settings.set" function its not possible to config userName and password for the proxy. So every time I have to manually enter credentials once settings…
Prasad19sara
  • 332
  • 2
  • 10
8
votes
3 answers

Is it possible to interact with a local application in a Google Chrome extension?

I have begun using Google Chrome as a primary browser, but I miss my Evernote extension, which can clip a web page directly to the local Evernote application. Is it possible for me to write an extension in Chrome that can do this?
Jake
  • 715
  • 7
  • 15
8
votes
2 answers

How to set a closing time for notification extension chrome

I'm developing an extension with chrome.notifications would like to set a time for closing the notification, how can I do this?
guto
  • 117
  • 1
  • 1
  • 8
8
votes
1 answer

How do all types of Chrome extension scripts work?

I'm new to Chrome extensions and would like to understand how all types of scripts/pages work. Here is my understanding: First - there are "content scripts", ones that should be used to actually modify the pages. Second - there is a "background…
Gil Goldshlager
  • 651
  • 1
  • 8
  • 22
8
votes
3 answers

Google Chrome Extensions: How to detect Copy action (Ctrl-C and Edit-Copy)?

How might I detect that a user has selected and copied some content in the currently active tab in a Google Chrome Extension? It appears that there are no suitable Events that deal with the Clipboard in chrome.tabs or chrome.windows. Is there a way…
bjoern
  • 283
  • 3
  • 9
8
votes
2 answers

launchWebAuthFlow with Spotify returns "Authorization page could not be loaded"

I registered my app on Spotify. I made sure I had the URI added to my registered app. But still every time I run this code I keep getting the same error. I am also running this in the background so I know it's not that. What am I doing wrong? Also I…
8
votes
4 answers

How to execute content script after the page is loaded completely

I'm trying to write a Google chrome extension that grabs the element in the page by its class name. The idea is to use the content script to grab these elements and pass the messages to the extensions and pop up. However, my content script always…
Irene Yeh
  • 85
  • 1
  • 1
  • 3
8
votes
2 answers

Using Segment IO in Chrome Extension

I can't seem to get Segment to work despite following these instructions: https://segment.com/docs/platforms/chrome-extension/ When I run analytics.track, I don't see any network requests for the tracking pixels but I don't see any error either. The…
8
votes
2 answers

Forms in Webkit HTML Notifications?

Is it possible to use form elements in Webkit HTML desktop notifications? I'm tried to open a HTML notification from a Chrome extension, and the I added appears, but I cannot type in it. I'd like to be able to capture the input from it and…
Gilean
  • 14,708
  • 10
  • 45
  • 52
8
votes
4 answers

Enabling Chrome Extension in Incognito Mode via CLI flags?

I'm using selenium to test a chrome extension and part of the extension requires the user to be in incognito mode. Currently, I've not been able to enable the extension to be allowed in incognito mode upon startup except by adding the argument…
8
votes
2 answers

How adding more links on the extension page action

I'm developing an extension page action that works only in a specific domain, can I add more than one link to the page action? My background.js is this. it is possible to add more links in background.html for the extension page action?…
8
votes
1 answer

Chrome extension-Open the captured screen shot in new tab

chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { chrome.tabs.captureVisibleTab(null ,{ format: "png"}, function (src) { $('body').append("" +…
abhilash
  • 827
  • 11
  • 20
8
votes
1 answer

launch testem chrome browser with specific extension(s)

I am trying to have Testem launching my tests into Chrome browser with specific extension(s) loaded, but by default it's a blank Chrome profile which is started, and which doesn't persist extensions from one run to another. My goal is for example…
Huafu
  • 2,445
  • 1
  • 22
  • 26
8
votes
1 answer

How to create a toolbar button for a Chrome Tampermonkey user script?

I have written a userscript that I would like to run when I call it (not every time a matching web page loads). Ideally I'd like to create a toolbar button for starting this script. How can this be done? PS: I need it to run in the same context with…
Ivan
  • 63,011
  • 101
  • 250
  • 382
8
votes
1 answer

Proper way to listen as TCP server in Chrome extension

I want to create a TCP server and listen on it. I need access to the tab content, so I need a chrome extension. Sadly, only chrome apps can create TCP servers. Is it a valid/good concept to create a TCP server in a chrome app and let the app…