mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Implements OpenSearch support, closes #107
This commit is contained in:
parent
ee43d8cfb1
commit
8bffb61e68
3 changed files with 25 additions and 0 deletions
12
src/views/opensearch.nimf
Normal file
12
src/views/opensearch.nimf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#? stdtmpl(subsChar = '$', metaChar = '#')
|
||||
#proc generateOpenSearchXML*(name, hostname, url: string): string =
|
||||
# result = ""
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
|
||||
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
|
||||
<ShortName>${name}</ShortName>
|
||||
<Description>Twitter search via ${hostname}</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Url type="text/html" template="${url}{searchTerms}" />
|
||||
</OpenSearchDescription>
|
||||
#end proc
|
||||
Loading…
Reference in a new issue