If you console.log the URLs that you are enabling page actions for, are they different than the url displayed in the Omnibox? For example, is there a redirect involved or a fragment added to the url (such as http://foo -> http://foo#anchor)? Do you have a build of Chromium that you can set a breakpoint in some of the C++ code?
It would also help to know the Chrome version number you are using... On Thu, Sep 3, 2009 at 14:34, Scott Ferguson <[email protected]> wrote: > > I just tried using the tabs API and it's still not displaying the page > actions consistently (or at all). > > On Sep 3, 2:25 pm, Aaron Boodman <[email protected]> wrote: > > Scott, to help narrow down the problem, can you change the code to use > > the tabs API: > > > > chrome.tabs.onCreate.addListener(function(tab) { > > chrome.pageActions.enableForTab(...); > > > > }); > > > > If this works well, we'll know it has to do with messaging. If it > > doesn't, we'll know it has to do with page actions. > > > > Also, keep in mind that when you have multiple windows, each toolstrip > > is going to get tab events for all windows. So using the background > > page is often simpler. > > > > - a > > > > > > > > On Thu, Sep 3, 2009 at 7:23 AM, Scott Ferguson<[email protected]> > wrote: > > > > > I have this block of code sitting in my toolstrip's Javascript: > > > > > chrome.self.onConnect.addListener(function(port) { > > > port.onMessage.addListener(function(data) { > > > url = port.tab.url; > > > title = data.title; > > > > > // Register the tab with the tagging page action > > > chrome.pageActions.enableForTab("tag_page", > > > { > > > tabId: port.tab.id, > > > url: port.tab.url, > > > title: "Click to tag this > > > page", > > > iconId: 0 > > > }); > > > }); > > > }); > > > > > And for whatever reason, I can't consistently get the page actions to > > > show up. It feels like when I reload the extension there's at least a > > > long delay between the reload and the icons actually showing up, and > > > if I don't have the RSS extension installed I can't get them to > > > display at all. Am I missing something here or is it just Chromium > > > beta weirdness? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
