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
0
votes
0 answers

BrowserAction, open settings page in a tab, reuse the same tab

Nowadays, a lot of extensions show settings on a tab instead of a pop-up. The existing answer works, but it opens a new tab if I click the icon again. Of course, it would be better if an existing settings tab is brought to the front instead of a new…
Damn Vegetables
  • 8,055
  • 11
  • 49
  • 98
0
votes
1 answer

Access current document from Firefox extension browser action background script

I'm building a toolbar button extension for Firefox. In my background script, I need to access the document for the current tab when the toolbar button is clicked. window in this context is the window for the extension, not for the current tab.…
Chris
  • 10,888
  • 18
  • 82
  • 142
0
votes
1 answer

how to make change to web page using chrome.tabs.executeScript()

I want to click my extension icon in the browser and have "test" appear in the console for the web page/tab i currently have selected in the browser. manifest.json: { "name": "some name", "version": "1.0", "description": "some…
Steve
  • 515
  • 2
  • 4
  • 13
0
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" },
0
votes
1 answer

Remove Browser Action Context Menu Default Title Entry

In my chrome extension I add a couple of entries to the context menu of the browser action. chrome.contextMenus.create({ id: 'browser_action_support', title: lang.POPUP.SUPPORT, contexts: ['browser_action'], onclick: function () { …
0
votes
0 answers

How to open Browser_Action from content.js? Is it even possible?

I am working on a chrome extension that allows users to open the browser_action by pressing a keystroke that THEY have assigned from the options-page. I would like to use document.onkeyup = function(){ Chrome.runtime.openPopup(); }; or something…
0
votes
1 answer

Angular as background script will not execute unless icon is clicked

I have setup my chrome extension's background to use angular. Here is my manifest. { "manifest_version": 2, "name": "Canary", "description": "Provides a means to add shopping items to your Canary wishlists", "version": "1.0", …
0
votes
1 answer

chrome.browserAction.onClicked fires when I load a new page

I am developing a very simple extension for Google Chrome which sets a badge text when the user presses the browser action icon. Here is the background.js: chrome.browserAction.onClicked.addListener(function() { …
0
votes
1 answer

browserAction on chrome extension to embed content on web page (like Rapportive)

I want to build a Chrome extension that shows some content embedded when a specific website is displayed. Exactly the same as Rapportive on Gmail. Seems that browserAction only enables me to show that content as a popup, not embedded on the webpage.…
user411103
0
votes
1 answer

Make Chrome Extension Browser Action Popup bigger than browser window

In FireFox extensions, the Panel/Popup that opens on the Toolbar sizes itself outside the browser window, if needed, so that we see every populated elements in the panel. In Chrome however, the popup/panel is only drawn until the browser window's…
Shahid Thaika
  • 1,633
  • 3
  • 16
  • 48
0
votes
1 answer

WebExtension: How can I access the background script in my browser action

I'm totally new to WebExtension (trying to use them under Firefox). I've written a browser action. In order to keep a persistent state I figured that I have to implement a background script. How can I acccess variables defined in the background…
anhoppe
  • 3,441
  • 3
  • 41
  • 53
0
votes
0 answers

How to get a Chrome extension to respond to a specific collection of URLs, by changing it's icon colour?

I am building a browser extension, and I want it to respond to only a specific list of urls - at the moment, I am just testing it with one URL, and I am trying to get an icon to change from white to green when a specific website is visited. (I want…
0
votes
1 answer

No console log for external script called by chrome.tabs.executeScript

I'm using two js files to accomplish a task for a chrome extension. In background.js, I have the following line of code that calls another js file: chrome.tabs.executeScript(tabId, {file: "src/bg/sidebar.js"}); When I run the extension, the script…
0
votes
1 answer

Popup page remains activated even if the page is gone

if you click on the browser button, appears a page as a popup page. with my program you can turn on music, from the body of the page. when the window appears, music can be turned on, but when the window goes away, music is stopped. does anyone…
user3625605
  • 303
  • 1
  • 4
  • 16
0
votes
0 answers

Chrome extension icon does not change after browser restart

I'm building a Chrome extension. Anything is working fine, except for one thing. The icon of the app sometimes, dued to particular events (domcontentloaded and alarms), MUST change. This is very easy to do (there's a setIcon method) and it generally…
user1094081