I'd like to write an extension that handles specific URLs that have custom scheme (myscheme://). How do I declare my extension so it is invoked on such a request and intercepts it? (The URL can be clicked, typed directly in the address bar, passed in the command line, etc.). This is probably a beginner question, but I'm a beginner!
Find and select the extension you want. Click Add to Chrome. Some extensions will let you know if they need certain permissions or data. To approve, click Add extension.
Open the Extensions by clicking the puzzle icon next to your profile avatar. A dropdown menu will appear, showing you all of your enabled extensions. Each extension will have a pushpin icon to the right of it. To pin an extension to Chrome, click the pushpin icon so that the icon turns blue.
Right-click the extension's icon located in the toolbar and then select “Manage Extensions.” Scroll down until you see “Allow Access to File URLs” and toggle the switch to the “On” position.
You can do it on your PC by enabling chrome://flags/#extensions-on-chrome-urls and adding the necessary url, chrome://extensions/ , into "matches" in manifest.
There is a JavaScript API that you can use for this.
navigator.registerProtocolHandler("mailto",
"https://www.example.com/?uri=%s",
"Example Mail");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With