Run script each time Chrome extension icon clicked?

Remove the "popup" : "mine. Html" from your manifest and use chrome.browserAction.onClicked. AddListener(function(tab) { alert('icon clicked')}).

Remove the "popup" : "mine. Html" from your manifest and use chrome.browserAction.onClicked. AddListener(function(tab) { alert('icon clicked')}); code.google.com/chrome/extensions/browse....

Where exactly do I put this. Without mine. Html the only file in the extension is the manifest... well, and the icon.

– Endophage Aug 24 at 2:50 Take a look at background pages - code.google. Com/chrome/extensions/background_pages.html. Thats where you place your long running code and code that is common across different pages.

The link to the document above has an example with browserAction. OnClicked – arunkumar Aug 24 at 9:30 Ah got it. I tried a background page initially but wasn't aware of the browserAction.onClicked.

– Endophage Aug 24 at 16:21.

Instead of specifying a popup page, use the chrome.browserAction. OnClicked API, documented here: code.google.com/chrome/extensions/browse....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions