Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to create a single local HTML file that allows me to add a custom search engine to my Tor Browser.

https://github.com/adrw/torduckgo tells us how to do it with two files:

An HTML file with the special rel="search" link:

<html>
    <head>
        <link rel="search"
              type="application/opensearchdescription+xml"
              title="MySearch"
              href="http://link-to-my-search.xml">
    </head>
    <body/>
</html>

And the linked XML file:

<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  <ShortName>TorDuckGo</ShortName>
  ...
</OpenSearchDescription>

The problem: Tor Browser does not follow local links so opening the local HTML file will not see the XML file. Tor also does not access localhost. Thus I cannot serve these two files locally either.

I would like to embed the XML search specification inside the single HTML file and have the special rel="search" link point to it. This way I could open the local HTML file and it does not need to follow links. Is this possible?

Alternatively, can I use a different way to add the search engine? Instead of rel="search"?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
515 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...