Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://superuser.com/questions/7327/how-to-add-a-custom-search-engine-to-firefox/1566328#1566328
- Here is how I restored the Twitter search engine for Firefox, which seems to have been removed in Firefox 78 (you could create a search for other websites also based on this answer):
- I tested with the Linux version of Firefox (Ubuntu package) but it should work with any operating system by creating the `distribution` folder / subfolders and search plugin file (https://wiki.mozilla.org/Mobile/Distribution_Files).
- In my profile folder `.mozilla/firefox/xxx.default/`, there was a file `search-metadata.json` that contained a link to a non-existing file `/usr/lib/firefox/distribution/searchplugins/locale/en-US/twitter.xml`.
- So I created this file with the following content (based on the documentation https://developer.mozilla.org/en-US/docs/Mozilla/Creating_MozSearch_plugins and search plugins already present https://packages.ubuntu.com/focal/amd64/firefox/filelist):
- <?xml version="1.0" encoding="utf-8"?>
- <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
- <ShortName>Twitter</ShortName>
- <Description>Twitter Search</Description>
- <InputEncoding>UTF-8</InputEncoding>
- <Image height="16" width="16">data:image/x-icon;base64,
- AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAA
- AAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
- ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/
- //8A////AP///wD///8A////AP///wD///8A////AP///wz///8f////H////x////8Y////B///
- /wD///8A////AP///wD///8A////AP///wD///8A////A////yj7789g9tV+ofbVfqH21X6h+N+e
- ifz03lf///8o////A////wD///8A////AP///wD///8A////APr37g/PsGCftogQ7r2JAP/bnwD/
- 7qwA/+6sAP/urAD/9Mtftv357z////8D////AP///wD///8A////AP///wD///8A////AP///w/5
- 7c5a88VQwu6sAP/urAD/7qwA/+6sAP/xvDDb/fnvP////wD///8A////AP///wD///8A////AP//
- /wDz5L5X7bgv2+6sAP/urAD/7qwA/+6sAP/urAD/7qwA//G8MNv///8Y////AP///wD///8A////
- AP///wD///8M9NN+n+6wD/PurAD/7qwA/+6sAP/urAD/7qwA/+6sAP/urAD/9Nyegf///wD///8A
- ////AP///wD///8A+O3PVu6wD/PurAD/7qwA/+6sAP/urAD/7qwA/+6sAP/urAD/7qwA//G8MNv/
- //8A////AP///wD///8A////ANasQMXurAD/7qwA/+qpAP/YnAD/1JkA/+6sAP/urAD/7qwA/+6s
- AP/urAD/////FP///wD///8A////AP///wDz255+7qwA/9icAP+6ixDuz7Bgn9m8b5TurAD/7qwA
- /+6sAP/urAD/7qwA//jkr3j///8M////AP///wD///8A47Y/ysmRAP/PsGCf+vfuD////wDw584w
- 46QA/+6sAP/urAD/7qwA/9+hAP/orA/z9OrPQv///wD///8A////AMypT7Hhz55g////AP///wD/
- //8A////AMOaL9DMlAD/0JYA/8mRAP/FoEC/vpIf4OPQnmL///8A////AP///wD69+4P////AP//
- /wD///8A////AP///wD69+4P3ceOcNi/foHhz55g////APr37g/69+4P////AP///wD///8A////
- AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
- ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/
- //8A//8AAP//AAD//wAA8P8AAMA/AAD4HwAA8A8AAOAHAADgBwAAwAcAAOAHAADHAwAA3wMAAP/f
- AAD//wAA//8AAA==</Image>
- <Url type="text/html" method="get" template="https://twitter.com/search?q={searchTerms}"/>
- </OpenSearchDescription>
- To get the Base64 of the latest Twitter icon that you can see above, I downloaded https://twitter.com/favicon.ico and used the Linux command `base64 favicon.ico`.
- The following files were present in my profile folder but were not needed anymore so I removed them to avoid potential conflicts (you can backup files in case you want to reuse them): `search-metadata.json`, `search.json`, `search.json.mozlz4`.
- The following answers did not work for me but contained useful information:
- https://stackoverflow.com/questions/9963256/adding-a-custom-search-engine-to-firefox/10034461#10034461
- https://stackoverflow.com/questions/9963256/adding-a-custom-search-engine-to-firefox/40651019#40651019
Add Comment
Please, Sign In to add comment