I'm having a similar problem.
It worked on December 4th, I'm not sure when It stopped working.
I'm just trying to print the current tab with a browser action
chrome.browserAction.onClicked.addListener(function(tab) {
window.print();
It used to bring up the standard print dialog, then when you pressed
print or enter on the dialog it would print the current tab, now it
seems to just print my blank background.html - On Windows, nothing
happens, on Linux it spits out a blank page from the printer. But
last week it worked perfectly fine. It appears that the script is
being run on the wrong page (background.html rather than the current
tab)
Unless I'm missing something.
On Dec 6, 2:55 pm, David Hilley <[email protected]> wrote:
> Hi, I've been working on an extension similar to It's All Text or
> mozex for editing textareas in external editors. I used to use page
> actions but now I've converted the functionality into a browser
> action. The thing works fine on virtually all pages, but I'm getting
> some behavior I can't explain with Gmail.
>
> I have the following in the extension background page:
>
> chrome.browserAction.onClicked.addListener(function(tab) {
> chrome.tabs.executeScript(tab.id, {file: "update.js", allFrames:
> true});
>
> });
>
> I just want to run update.js over the page content to grab textareas
> out of the DOM. For testing purposes, I have an unconditional
> console.log output in update.js. Now, when I first load Gmail (or hit
> browser refresh), open the page console and hit the browser action
> button, I see the console.log output as expected. As soon as I click
> on a message or do something which causes the page to be dynamically
> updated (navigate to a label), clicking on the browser action button
> no longer does anything. I don't see the output in the console, so it
> no longer seems to be running update.js in the same/right window.
>
> If I navigate to a message, hit the browser refresh button and then
> click the browser action button it works again until I move to another
> thread or label. Why would this be the case?
>
> I'm running 4.0.264.0 SVN revision 33819. Thanks.
--
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en.