2

I am building a Google Chrome Extension which uses some shortcut keys, set using a Content Script. The shortcuts work on all http:// and https:// pages, but I would like the keyboard shortcuts to also be loaded on a user's "New Tab" page as well as on any "chrome://" pages. I am not sure if this is possible. Any help would be greatly appreciated.

I included the relevant parts of my current manifest.json file:

"permissions": [
    "tabs", "*://*/*", "storage" 
  ],
  "content_scripts": [
    {
      "matches": ["*://*/*"]
    }
  ],
  • You can't use content scripts on those pages. – BeardFist May 24 '13 at 21:10
  • Not possible. Consider using the `chrome.commands` API, see [Override the bookmark shortcut (Ctrl+D) function in Chrome](http://stackoverflow.com/questions/13429178/override-the-bookmark-shortcut-ctrld-function-in-chrome) – Rob W May 24 '13 at 21:24

1 Answers1

0

You can now replace the default new tab page with an HTML page from the extension. More information here. (You can also override the bookmarks and history pages, but not all from the same extension.)

Extensions cannot access any other chrome:// urls.

AdamRaichu
  • 149
  • 1
  • 13