Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome chrome omnibox如何在域上添加搜索_Google Chrome_Search_Omnibox - Fatal编程技术网

Google chrome chrome omnibox如何在域上添加搜索

Google chrome chrome omnibox如何在域上添加搜索,google-chrome,search,omnibox,Google Chrome,Search,Omnibox,如何配置他的网站,让用户使用omnibox只在他的域上搜索 例如: 键入youtube.com,然后按tab 或键入yahoo.com,然后按 试着用维米奥是行不通的 我在源代码中找不到任何东西。有关于如何操作的信息,您可以使用chrome插件强制页面拥有所需的代码,以实现此功能,但我不确定这样做的效果如何。是的,这是可能的。 我这样做是为了我的博客 <link rel="search" type="application/opensearchdescription+xml" t

如何配置他的网站,让用户使用omnibox只在他的域上搜索

例如:

  • 键入youtube.com,然后按tab
  • 或键入yahoo.com,然后按
  • 试着用维米奥是行不通的
我在源代码中找不到任何东西。

有关于如何操作的信息,您可以使用chrome插件强制页面拥有所需的代码,以实现此功能,但我不确定这样做的效果如何。

是的,这是可能的。 我这样做是为了我的博客

 <link rel="search" type="application/opensearchdescription+xml" title="The Sheng Blog" href="/resources/opensearch.php"/>

opensearch.php如下所示:

 <?xml version="1.0"?>
 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
     <ShortName>The Sheng Blog (Beta)</ShortName>
     <Description>The Sheng Blog Search</Description>
     <Developer>Sheng Slogar</Developer>
     <LongName>Search the entire Sheng Blog</LongName>
     <InputEncoding>UTF-8</InputEncoding>
     <OutputEncoding>UTF-8</OutputEncoding>
     <Query role="example" searchTerms="code"/>
     <SyndicationRight>open</SyndicationRight>
     <AdultContent>false</AdultContent>
     <Language>en-us</Language>
     <Contact>contact@theshengblogg.comule.com</Contact>
     <Tags>code posts tutorials ideas playground</Tags>
     <Image width="16" height="16" type="image/x-icon">data:/ico;base64,AAABA...(Icon in base64)</Image>
     <Url type="text/html" template="http://theshengblogg.comule.com/search.php?s={searchTerms}"></Url>
     <Url type="application/x-suggestions+json" method="GET" template="http://theshengblogg.comule.com/autocomplete.php?search={searchTerms}&amp;json=true"/>
 </OpenSearchDescription>

盛博(测试版)
博客搜索
圣斯洛加
搜索整个博客
UTF-8
UTF-8
打开
. 自动完成部分是可选的。以JSON格式返回它

例如,如果搜索“a”,则返回[“a”、“关于”、“跨越”、“全部”和“]。(请注意,我将您的查询作为项0放入数组中。)

我的自动完成功能似乎只在Firefox中起作用。这可能与我的子域有关。 我也无法让它在IE或Chrome中工作