0

When I open the Extensions page (chrome://extensions), I almost always want to go to the Chrome Web Store to add/search for a new extension. In their infinite wisdom, the Chrome Web Store link is not in the default view. You have to click the bottom in the far top left, then click the button in the far bottom left, and that's a UX pet peeve of mine. I do have Chrome Web Store bookmarked, but I never have the bookmarks bar visible, and I always forget to go there rather than navigating to the extensions page.

I want to create a Tampermonkey script that runs on /^(chrome|edge)://extensions$/, checks if the last time I opened the url was more than a half hour ago, and then automatically redirects to the Chrome Web Store. Unfortunately, the Greasemonkey (predecessor to Tampermonkey) documentation includes this (emphasis mine):

Greasemonkey will run scripts only on documents loaded from particular schemes. By default, those are:

  • http
  • https
  • about:blank

User scripts will not run on documents from any other scheme (ftp, file, etc.) or any other part of about.

It appears Chrome extensions in general only have access to http(s), ftp(s), and about:blank by default, with an option to specify specific urls with the file:// schema.

Since there is a setting for the file schema (indicating that the last line is at least partially wrong), I hope there is a way to allow access to specific browser schema pages. Does anyone know if there is?

dx_over_dt
  • 13,240
  • 17
  • 54
  • 102
  • 1
    Should be covered by [Can you access chrome:// pages from an extension?](https://stackoverflow.com/a/19046796) – wOxxOm Oct 08 '20 at 17:49
  • Aye. I did a quick search for that, but didn't see that question, somehow. – dx_over_dt Oct 08 '20 at 17:50
  • Now I have to figure out if there's a way to modify the extension manifest to request it. – dx_over_dt Oct 08 '20 at 17:52
  • 1
    I think it'd be easier to write a separate extension, you can modify one of the official [demo extensions](https://developer.chrome.com/extensions/samples). – wOxxOm Oct 08 '20 at 17:54
  • I just opened the extension's directory, deleted the thumbprint, and added to the `content_scripts`. It worked. ‍♀️ – dx_over_dt Oct 08 '20 at 18:22

0 Answers0