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

54 questions
2
votes
1 answer

Bypassing the "no popup" if I want a javascript to run when extension clicked

I have a chrome extension which I want to fire whenever I press the popup. Currently I can do this only if I remove the popup.html from manifest.json, since there's a restriction on that. However, I need the popup.html How do I get both? I have…
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
  • 3,633
  • 3
  • 21
  • 40
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
  • 8
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
  • 669
  • 2
  • 7
  • 12
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": { …
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"), …
0
votes
0 answers

Chrome extension Browser action icon querying

I am not sure, but is there a way to figure out what browser action icon currently is used? Maybe i am just stupid, but better to ask than to never know.
user9117853
0
votes
0 answers

Chrome Extension gives error: Uncaught TypeError: Cannot read property 'addEventListener' of null

Issue: I am trying to create a simple Chrome extension to help with my work, and it appears that my function is trying to find an object in the DOM before it is created. Error Message What I have tried: Wrapping my content.js function in a…
0
votes
0 answers

Using Marionette to click a browser action

Firefox can be started with an add-on with marionette support like so : npx web-ext run --arg='--marionette' This enables the marionette client to e.g. .navigate() to a page. Is it possible to click a webextension browser action icon ? The aim is…
serv-inc
  • 29,557
  • 9
  • 128
  • 146