evilpie / add-custom-search-engine

Add a custom search engine to the list of available search engines in Firefox
https://addons.mozilla.org/en-US/firefox/addon/add-custom-search-engine/
Mozilla Public License 2.0
173 stars 13 forks source link

Does this extension support the file:// protocol? #36

Closed maxbla closed 3 years ago

maxbla commented 3 years ago

A programming language I'm using has HTML API docs with a search feature. They're accessible over the internet using the https://, but I'd like to use them offline. I have them downloaded on my computer at file:///home/redacted/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/index.html?search=%s. I can add the online api docs search as a search engine, but when I try to add the offline version as a search engine, I get the error "Firefox could not download the search plugin from: https://paste.mozilla.org/HVcDZkD5/raw", despite the fact that the paste.mozilla.org link contains what looks like the right stuff. I suspect there is some permission issue with the file:// protocol.

pastebin text ```xml test UTF-8 null/favicon.ico ```
evilpie commented 3 years ago

Firefox doesn't support adding file:// URLs via OpenSearch: https://searchfox.org/mozilla-central/rev/7a2cf04303cf6d4b684905a1af936b6da5e7ef59/toolkit/components/search/SearchEngine.jsm#384

maxbla commented 3 years ago

Darn. Thanks for this add-on.