Modify Protocols With Chrome Extension?
I have an idea for a chrome extension where I take a protocol, just for example, helloworld://
and in the url bar you could do helloworld://check th开发者_StackOverflowis out
and i could have the plugin alert "check this out"
or do some other complex AJAX stuff?
Is this possible?
Is this a custom, made up, protocol? Chrome Extensions only operate on http, https, file or ftp schemes.
Or if you want to register a keyword in the address bar you can try the still experimental omnibox extension API. Then all text entered after a certain keyword is forwarded to a function which can process it and return a result, or maybe trigger other events.
http://code.google.com/chrome/extensions/trunk/experimental.omnibox.html
Edit by Dan Atkinson
The above URL is now a 404. In the interest of keeping this answer relevant, the new url is: https://developer.chrome.com/extensions/omnibox.html
精彩评论