Questions tagged [browser-action]

a way to extend Google Chrome browser by placing an icon alongside the address bar (omnibox) with popup, click and context menu handling functionality

53 questions
2
votes
2 answers

Service worker not listening to the action when the toolbar icon is clicked - Chrome Extension v3

I am new to this. I have a requirement, which should open a new tab when clicked on the toolbar icon. My manifest file : { "name": "App", "description": "App", "version": "1.0", "manifest_version": 3, "icons": { "16": "icon16.png", …
2
votes
0 answers

How to close/dismiss default_popup when clicked outside in chrome extension?

I know that we can close a default_popup using window.close() but i need to close the popup when user taps on outside. I was not able to get any documentation about it in the console. "browser_action":{ "default_popup":"auth_popup.html" },
2
votes
1 answer

Fill form via chrome extension popup

I want to load values from fill.js and when the anchor link in extension popup.html is clicked it will autofill form fields on a remote page that has field IDs of #user + #pw. This is what i currently have in my extension but i'm not sure if it's…
7O07Y7
  • 519
  • 2
  • 6
  • 18
2
votes
0 answers

How to stop chrome.tabs.reload from resetting the extension icon?

i am writing an extension which sets the extension-icon to an "active" one for a specific tab, but if i reload this tab by chrome.tabs.reload(id), the icon changes back to the default one. Little code example: chrome.browserAction.setIcon({ …
1
vote
0 answers

CSS injection for firefox addon not working

I'm working on a firefox addon that needs to inject css in the document. Here is a part of the manifest.json file. "content_scripts": [ { "matches": [""], "js": ["inject_css.js"] } ], "permissions": [ "storage", …
1
vote
1 answer

Set default height in Chrome BrowserAction Popup

I use following code to open a chrome browser action popup. I have specified min-width & min-height to html & body element, but it doesn't seem to work, as I can see a small white box when I click on icon & then my content & styles get applied. I am…
demonofthemist
  • 4,081
  • 4
  • 26
  • 45
1
vote
1 answer

Toggle icon upon browser action click

How can I toggle my extension icon on browser action onclick? manifest.json { "manifest_version": 2, "name": "Toggle Icon", "description": "Toggle browser action Icon", "version": "1.0", "homepage_url": "https://www.stackoverflow.com/", …
1
vote
1 answer

Avoid creation of browser action in Chrome extension

I am creating a chrome extension. When the extension is added to chrome, then icon next to address bar is added also (browser action). My extension does not need any browser action. So, how can I avoid creation of this icon? Edit: My manifest…
oarar
  • 137
  • 1
  • 9
1
vote
1 answer

Using browser_action to apply css styling

I am new to chrome extension development. I am writing a chrome extension that will inject CSS into the page. I've been successful in doing this by specifying the css file in manifest.json. I now want to apply different css (files) depending on a…
zeeshan
  • 719
  • 2
  • 7
  • 13
1
vote
3 answers

Accessing chrome sync data from content_scripts and browser_action

I'm trying to share data between the browser_action and the content_scripts. Currently, I'm having an issue where I CAN access the data in the browser_action page (it returns the proper values once set and saves across sessions). HOWEVER, I can't…
1
vote
1 answer

Keyboard shortcut to Toggle (hide/show) my chrome extension

I am working on extension, i want my chrome extension to toggle (show / hide) via command like say (mac: "CMD+SHIFT+9" or default: "Ctrl+Shift+9"); Though i have defined command in my manifest file: { ......... "commands": { …
narainsagar
  • 1,079
  • 2
  • 13
  • 29
1
vote
0 answers

browser action set badge action for firefox addon

I need to show notification on firefox addon using sdk. Its very much similar to chrome's browser action set badge text. Any help will be greatly appreciated. Regards Adnan Bashir
1
vote
1 answer

How to use file system in extension?

I want to save/load files from my extension (sandbox or not, no matter). But I can't use "file:///*" permission because Chrome Web Store don't allow it. I can't use "fileSystem" permission because "the permission allowed only for packaged apps". I…
1
vote
1 answer

How to listen for messages in the main.js using "browser-action-jplib"

I read about the lib from Rob in his answer here, which is pretty much exactly what I need. I am creating a badge using his library: var badge = require("browserAction").BrowserAction({ default_icon: data.url("images/icon19.png"), …
1
vote
1 answer

Setting browserAction icon in a concrete Chrome window

I want to set different browserAction icons in different windows. The only method I found for this is: http://developer.chrome.com/extensions/browserAction.html#method-setIcon But it doesn't take a context. It changes icon in every window. I know…
ciembor
  • 7,189
  • 13
  • 59
  • 100