1

My chrome extension load content script according to this manifest:

"matches" : [ "<all_urls>" ],
"js" : ["scripts/namespace/namespace.js", 
        "scripts/log/Logger.js"]
"run_at" : "document_start",
"all_frames" : true

When I click a link and open a popup window which contains a calendar, content script fails to load in this window.
the window url is about:blank.
Is there any way to handle this?

Leslie Wu
  • 760
  • 3
  • 13
  • 29
  • Please, provide more info. Is it your extension's popup or external site? what do you specifically mean under "content script fails to load"? – Stan May 27 '13 at 12:22
  • external website, click a calender element and it pops up a window to select date in a calender. this window's url is about:blank. My extension content script does not load in this pop up window. @Stan – Leslie Wu May 28 '13 at 02:31
  • 2
    There is [an issue about this](http://code.google.com/p/chromium/issues/detail?id=55084). You can't place a content script into `about:blank` right now. But you could possibly investigate the specific method how the popup is opened, and intercept it by other means manually (it's hard to tell without knowing how the window is open; for example, try chrome.windows or something else). Also I don't think there is a need to post [the duplicate question](http://stackoverflow.com/q/16785641/1102014). Why not to extend this initial question? – Stan May 28 '13 at 19:36
  • 1
    Small addition. I've just tried to make a workaround with the suggested approach and run `chrome.tabs.executeScript` from a registered `chrome.windows.onFocusChanged` handler. It fails with a similar problem: `about:blank` is not permitted at the moment. And there is again [an issue on this](http://code.google.com/p/chromium/issues/detail?id=55084). It looks like you can't inject scripts into `about:blank` untill the issues are fixed in Chrome. – Stan May 28 '13 at 20:29

0 Answers0