Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you access chrome:// pages from an extension?

Tags:

When you're writing the manifest.json file, you have to specify matches for your content scripts. The http and https work fine, but if I try to include chrome://*/* or any variant of it, I get an error that I'm attempting to use an invalid scheme for my matches.

Is it not allowed?

like image 617
temporary_user_name Avatar asked Sep 27 '13 04:09

temporary_user_name


People also ask

What can a Chrome extension access?

Your tabs and browsing activity: The app or extension can see the URLs and titles of websites you visit. It can also open and close tabs and windows, as well as navigate to new pages in open tabs and windows. Your physical location: The app or extension can use the current location of your computer or device.

Can a Chrome extension access local files?

For security reasons, by default the Chrome browser does not allow extensions to access local files. If you want the accelerator to access local files (locations of "file:///...", instead of "http://" or "https://"), you must configure Chrome to allow the access.

What can browser extensions access?

Most browser extensions have partial or full access to everything you do online. This means they can track your browsing, capture your passwords, and even insert customized ads based on your browsing history.


2 Answers

By default you cannot run on a chrome:// url page.

However, there is an option in chrome://flags/#extensions-on-chrome-urls:

Extensions on chrome:// URLs (Mac, Windows, Linux, Chrome OS, Android)
Enables running extensions on chrome:// URLs, where extensions explicitly request this permission.

You still have to specify pages that your extension can run on and wildcards are not accepted - so you have to specify the full URL eg chrome://extensions/

like image 178
Andrew Hall Avatar answered Oct 13 '22 00:10

Andrew Hall


The authorized schemes for matches are http, https, file, ftp.
Therefore, chrome is not a valid scheme.

like image 23
Métoule Avatar answered Oct 12 '22 23:10

Métoule