User:Marty/Searchplugin

From RationalWiki
Jump to navigation Jump to search

I made an OpenSearch plugin for Conservapedia. I don't know how to package it so that Firefox can install it in one click, but with Firefox 3 on Linux, at least, you can copy this XML code into a file called ~/.mozilla/firefox/hsomething.default/searchplugins/conservapedia.xml and it will just start working.

Conservapedia serves its own version of this XML from http://www.conservapedia.com/opensearch_desc.php, but its version is broken because the favicon (which is supposed to be a base64-encoded 16x16 PNG image) is actually a base64-encoded HTML file. This confuses Firefox pretty bad. Also, my version takes you to Special:Recentchanges if you don't enter anything in the search box.

If anyone knows how to make this a one-click install, I'd like to hear about it on my talk page. The icon is slightly crappy, too; got a better one?


<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Conservapedia</os:ShortName>
<os:Description>Conservapedia</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC
AK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAV1JREFU
OE+NUguRxSAMxEVdIAMXcYGLuIiLyIgLXHC7ATp9n5u7zGxpaXazCZT5FmOM6VebetXZNqy2adj7
FuX5waRKtD7NHavme5gleoFYk+8CXheRUUVnAyJGrgw6S3cQNrh6ESBZuiZIlo5qQNsYCgcJiCKH
LkxWsWLYuKpkdZK7LpJgpRAxkBxsBUSvkgV1uyi049lvT7u0eRORIOpzopURMYcHZuE5D0cBhVBh
9av2W8BjC4DYNzDRORKWQiSzKJECio3TgqOKItmw0s0z+G3MrRUczAKCxaHYWsPEF+H5TjERSeQe
hB1Ex9wcc+lov/AnFWmHSX/FOU7mcpCFD4MIFamcRwWb2bMfRK5xQCeAFgrwdu3r6gc8LiA2/HF8
51rTPp3kRaKL7OsDfTkjeHmILXLfAz7c1pmyr//g4yozDL2zHfZ2znj1/Dv5ReAERWgvh7txvvsb
mfEDUEjmcTAKt1gAAAAASUVORK5CYII
</os:Image>
<os:Url type="text/html" method="GET" template="http://www.conservapedia.com/index.php">
  <os:Param name="title" value="Special:Search"/>
  <os:Param name="search" value="{searchTerms}"/>
</os:Url>
<os:Url type="application/x-suggestions+json" method="GET" template="http://www.conservapedia.com/api.php">
  <os:Param name="action" value="opensearch"/>
  <os:Param name="search" value="{searchTerms}"/>
</os:Url>
<SearchForm>http://www.conservapedia.com/Special:Recentchanges</SearchForm>
</SearchPlugin>