Add MDN webjump

This commit is contained in:
Tom Willemse 2016-09-24 17:18:10 +02:00
parent eefc28249e
commit 798391c5df
2 changed files with 44 additions and 0 deletions

View file

@ -33,3 +33,28 @@ access.
#+BEGIN_SRC js
hint_digits = "arstdhneio";
#+END_SRC
Add the ~search-engines/~ directory to the opensearch load path.
#+BEGIN_SRC js
function add_to_opensearch_load_path(new_path) {
if (new_path.startsWith('/')) {
opensearch_load_paths.push(new_path);
} else {
let path = get_home_directory();
path.append('.conkerorrc');
path.append(new_path);
opensearch_load_paths.push(path);
}
}
add_to_opensearch_load_path('search-engines');
#+END_SRC
Add a Mozilla Developer Network webjump. This uses their OpenSearch
description.
#+BEGIN_SRC js
define_opensearch_webjump("mdn", "mozilla-developer-network.xml");
#+END_SRC

View file

@ -0,0 +1,19 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http:/www.mozilla.org/2006/browser/search/">
<ShortName>Mozilla Developer Network</ShortName>
<Description>Search Mozilla Developer Network documentation</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/png">https://developer.cdn.mozilla.net/static/img/favicon32.e02854fdcf73.png</Image>
<Url type="text/html" method="get" template="https://developer.mozilla.org/en-US/search">
<Param name="q" value="{searchTerms}"/>
<Param name="w" value="3"/>
<Param name="qs" value="plugin"/>
</Url>
<Url type="application/opensearchdescription+xml"
rel="self"
template="https://developer.mozilla.org/en-US/search/xml"/>
<Url type="application/x-suggestions+json"
template="https://developer.mozilla.org/en-US/search/suggestions?q={searchTerms}"/>
<moz:SearchForm>https://developer.mozilla.org/en-US/search</moz:SearchForm>
</OpenSearchDescription>