0

当我检查搜索引擎的 Firefox 设置时,我可以看到关键字列 在此处输入图像描述

在 opensearch.xml 中,我可以定义Tags哪个不在这里创建条目。当我添加自己的 opensearch 时,我还想设置“关键字”。你是怎样做的?

到目前为止,我opensearch.xml看起来像这样并且正在工作(我可以在 Firefox 中将搜索添加到搜索栏中的绿色加号图标上):

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
    <ShortName>MyTitle</ShortName>
    <Description>My Description
    </Description>
    <InputEncoding>UTF-8</InputEncoding>
    <Tags>mytitle</Tags>
    <Image width="16" height="16" type="image/x-icon">https://myexample.com/favicon.ico</Image>
    <Url type="text/html" template="https://myexample.com">
        <Param name="query" value="{searchTerms}"/>
    </Url>
    <moz:SearchForm>https://myexample.com</moz:SearchForm>
</OpenSearchDescription>

我在文档中找不到任何参考资料。

4

1 回答 1

1

由于关键字条目是用户定义的快捷方式,因此您不能在 opensearch.xml 中设置它。

于 2021-06-08T12:02:12.410 回答