多功能框多个关键字
我的问题是关于多功能框的。 Chrome API 提供的想法,我想知道清单上是否有可能有多个关键字。
我正在考虑正则表达式或类似的东西,但我真的不知道该怎么做......
My question is about the Omnibox. The think provided by the Chrome API, i wanted to know if there is a possibility to have a multiple keyword on the manifest.
I've thinking about a regex or something like that but i don't really know what to do...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想我刚刚找到了解决方案。
我发现当您使用谷歌搜索“TRY”时,网址是:
当它来自 Chrome 网址时,它是:
所以基本上,如果我检查网址上是否有sourceid=Chrome,我可以像这样重定向。你怎么认为 ?
I think i've just find a solution.
I've discover that when you make a search for 'TRY' by using google the url is :
And when it come from Chrome URL it's :
So basically if i check if there is sourceid=Chrome on the url i can redirect like this. What do you think ?
抱歉,不可能。
我看到您仍在尝试制作自定义搜索提供程序。我想让您了解我在类似的扩展中所做的事情,例如,如果您以大写字母输入关键字,该扩展会触发谷歌幸运搜索而不是常规搜索。它有一些陷阱和限制(最大的一个是默认搜索提供商必须是 google,并且它仍然简要显示 google 搜索结果),但至少有一些:(
我正在使用 URL 解析器 插件)。
Sorry, not possible.
I see you are still trying to make custom search provider. I wanted to give you an idea of what I did in a similar extension which triggers google lucky search instead of regular one if you type your keyword in capital letters for example. It has some pitfalls and limitations (the biggest one is that default search provider must be google and it still briefly shows google search results), but at least something:
(I am using URL Parser plugin).