开发者

How to use address bar to control extension?

开发者 https://www.devze.com 2023-03-05 04:58 出处:网络
some time ago I read an article that it is possible to use the url adress bar in an google chrome extension.

some time ago I read an article that it is possible to use the url adress bar in an google chrome extension.

E.g. wikipedia stackoverflow will search for stackoverflow and open the wikipedia site.

However I can't find any reference about that feature: http://code.google.com/chrome/extensions/getstarted.html

Can you provide some information 开发者_如何学Pythonon that?


I found it! It's called Omnibox

The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox.

from https://developer.chrome.com/extensions/omnibox


Type a site name, press tab, then finish typing your search. It's a pretty strange UI concept but that's how it works. For example if you've visited stackoverflow.com before then go to the address bar and type "stackoverflow.com" then hit the tab key, the address bar changes to say "Search Stack Overflow:". You can press tab as soon as it suggests the domain name to switch to this search mode.

No extension needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消