preferences.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. {% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle, support_toggle, custom_select_class %}
  2. {% extends "oscar/base.html" %}
  3. {%- macro engine_about(search_engine, id) -%}
  4. {% if search_engine.about is defined or stats[search_engine.name]['result_count'] > 0 %}
  5. {% set about = search_engine.about %}
  6. <div class="engine-tooltip" role="tooltip" id="{{ id }}">{{- "" -}}
  7. {% if search_engine.about is defined %}
  8. <h5><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></h5>
  9. {%- if about.wikidata_id -%}<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>{%- endif -%}
  10. {% endif %}
  11. {%- if search_engine.enable_http %}<p>{{ icon('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%}
  12. {%- if stats[search_engine.name]['result_count'] -%}
  13. <p>{{ _('Number of results') }}: {{ stats[search_engine.name]['result_count'] }} ( {{ _('Avg.') }} )</p>{{- "" -}}
  14. {%- endif -%}
  15. {%- if reliabilities.get(search_engine.name, {}).errors or reliabilities.get(search_engine.name, {}).checker -%}
  16. <a href="{{ url_for('stats', engine=search_engine.name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
  17. {{ _('View error logs and submit a bug report') }}
  18. </a>
  19. {%- endif -%}
  20. </div>
  21. {%- endif -%}
  22. {%- endmacro %}
  23. {%- macro engine_time(engine_name, css_align_class) -%}
  24. <td class="{{ label }}" style="padding: 2px">{{- "" -}}
  25. {%- if stats[engine_name].time != None -%}
  26. <span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
  27. <span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
  28. {%- if max_rate95 is not none and max_rate95 > 0 -%}
  29. <span style="width: calc(max(2px, 100%*{{ (stats[engine_name].time / max_rate95)|round(3) }}))" class="stacked-bar-chart-median"></span>{{- "" -}}
  30. <span style="width: calc(100%*{{ ((stats[engine_name].rate80 - stats[engine_name].time) / max_rate95)|round(3) }})" class="stacked-bar-chart-rate80"></span>{{- "" -}}
  31. <span style="width: calc(100%*{{ ((stats[engine_name].rate95 - stats[engine_name].rate80) / max_rate95)|round(3) }})" class="stacked-bar-chart-rate95"></span>{{- "" -}}
  32. <span class="stacked-bar-chart-rate100"></span>
  33. {%- endif -%}
  34. </span>{{- "" -}}
  35. <div class="engine-tooltip text-left" role="tooltip" id="{{engine_name}}_graph">{{- "" -}}
  36. <p>{{ _('Median') }}: {{ stats[engine_name].time }}</p>{{- "" -}}
  37. <p>{{ _('P80') }}: {{ stats[engine_name].rate80 }}</p>{{- "" -}}
  38. <p>{{ _('P95') }}: {{ stats[engine_name].rate95 }}</p>{{- "" -}}
  39. </div>
  40. {%- endif -%}
  41. </td>
  42. {%- endmacro -%}
  43. {%- macro engine_reliability(engine_name, css_align_class) -%}
  44. {% set r = reliabilities.get(engine_name, {}).get('reliablity', None) %}
  45. {% set checker_result = reliabilities.get(engine_name, {}).get('checker', []) %}
  46. {% set errors = reliabilities.get(engine_name, {}).get('errors', []) %}
  47. {% if r != None %}
  48. {% if r <= 50 %}{% set label = 'danger' %}
  49. {% elif r < 80 %}{% set label = 'warning' %}
  50. {% elif r < 90 %}{% set label = 'default' %}
  51. {% else %}{% set label = 'success' %}
  52. {% endif %}
  53. {% else %}
  54. {% set r = '' %}
  55. {% endif %}
  56. {% if checker_result or errors %}
  57. <td class="{{ css_align_class }} {{ label }}">{{- "" -}}
  58. <a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}}
  59. <span aria-labelledby="{{engine_name}}_reliability">
  60. {{ icon('exclamation-sign', 'The engine is not reliabled') }} {{ r -}}
  61. </span>{{- "" -}}
  62. </a>{{- "" -}}
  63. <div class="engine-tooltip text-left" role="tooltip" id="{{engine_name}}_reliability">
  64. {%- if checker_result -%}
  65. <p>{{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}</p>
  66. {%- endif -%}
  67. {%- for error in errors -%}
  68. <p>{{ error }} </p>{{- "" -}}
  69. {%- endfor -%}
  70. </div>{{- "" -}}
  71. </td>
  72. {%- else -%}
  73. <td class="{{ css_align_class }} {{ label }}"><span>{{ r }}</span></td>
  74. {%- endif -%}
  75. {%- endmacro -%}
  76. {%- macro plugin_of_category(plugin_category) -%}
  77. {%- for plugin in plugins -%}
  78. {%- if plugin.preference_section == plugin_category -%}
  79. {{- preferences_item_header(_(plugin.description), _(plugin.name), rtl, 'plugin_' + plugin.id) -}}
  80. {{- checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}
  81. {{- preferences_item_footer(_(plugin.description), _(plugin.name), rtl) -}}
  82. {%- endif -%}
  83. {%- endfor -%}
  84. {% endmacro %}
  85. {%- block title %}{{ _('preferences') }} - {% endblock -%}
  86. {% block content %}
  87. <div>
  88. <h1>{{ _('Preferences') }}</h1>
  89. <form method="post" action="{{ url_for('preferences') }}" id="search_form">
  90. <!-- Nav tabs -->
  91. <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">
  92. <li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{ _('General') }}</a></li>
  93. <li><a href="#tab_ui" role="tab" data-toggle="tab">{{ _('User Interface') }}</a></li>
  94. <li><a href="#tab_privacy" role="tab" data-toggle="tab">{{ _('Privacy') }}</a></li>
  95. <li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li>
  96. <li><a href="#tab_query" role="tab" data-toggle="tab">{{ _('Special Queries') }}</a></li>
  97. <li><a href="#tab_cookies" role="tab" data-toggle="tab">{{ _('Cookies') }}</a></li>
  98. </ul>
  99. <!-- Tab panes -->
  100. <noscript>
  101. <h3>{{ _('General') }}</h3>
  102. </noscript>
  103. <div class="tab-content">
  104. <div class="tab-pane active" id="tab_general">
  105. <fieldset>
  106. <div class="container-fluid">
  107. {% if 'categories' not in locked_preferences %}
  108. <div class="row form-group">
  109. {% if rtl %}
  110. <div class="col-sm-11 col-md-10">
  111. {% include 'oscar/categories.html' %}
  112. </div>
  113. <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
  114. {% else %}
  115. <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
  116. <div class="col-sm-11 col-md-10 search-categories">
  117. {% include 'oscar/categories.html' %}
  118. </div>
  119. {% endif %}
  120. </div>
  121. {% endif %}
  122. {% if 'language' not in locked_preferences %}
  123. {% set language_label = _('Search language') %}
  124. {% set language_info = _('What language do you prefer for search?') %}
  125. {{ preferences_item_header(language_info, language_label, rtl, 'language') }}
  126. {% include 'oscar/languages.html' %}
  127. {{ preferences_item_footer(language_info, language_label, rtl) }}
  128. {% endif %}
  129. {% if 'safesearch' not in locked_preferences %}
  130. {% set safesearch_label = _('SafeSearch') %}
  131. {% set safesearch_info = _('Filter content') %}
  132. {{ preferences_item_header(safesearch_info, safesearch_label, rtl, 'safesearch') }}
  133. <select class="form-control {{ custom_select_class(rtl) }}" name="safesearch" id="safesearch">
  134. <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
  135. <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
  136. <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
  137. </select>
  138. {{ preferences_item_footer(safesearch_info, safesearch_label, rtl) }}
  139. {% endif %}
  140. {% if 'autocomplete' not in locked_preferences %}
  141. {% set autocomplete_label = _('Autocomplete') %}
  142. {% set autocomplete_info = _('Find stuff as you type') %}
  143. {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl, 'autocomplete') }}
  144. <select class="form-control {{ custom_select_class(rtl) }}" name="autocomplete" id="autocomplete">
  145. <option value=""> - </option>
  146. {% for backend in autocomplete_backends %}
  147. <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
  148. {% endfor %}
  149. </select>
  150. {{ preferences_item_footer(autocomplete_info, autocomplete_label, rtl) }}
  151. {% endif %}
  152. {{ plugin_of_category('general' )}}
  153. {% if 'doi_resolver' not in locked_preferences %}
  154. {% set label = _('Open Access DOI resolver') %}
  155. {% set info = _('Redirect to open-access versions of publications when available (plugin required)') %}
  156. {{ preferences_item_header(info, label, rtl, 'doi_resolver') }}
  157. <select class="form-control {{ custom_select_class(rtl) }}" name="doi_resolver" id="doi_resolver">
  158. {% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
  159. <option value="{{ doi_resolver_name }}" {% if doi_resolver_url == current_doi_resolver %}selected="selected"{% endif %}>
  160. {{ doi_resolver_name }} - {{ doi_resolver_url }}
  161. </option>
  162. {% endfor %}
  163. </select>
  164. {{ preferences_item_footer(info, label, rtl) }}
  165. {% endif %}
  166. {{ plugin_of_category('onion' )}}
  167. {% set label = _('Engine tokens') %}
  168. {% set info = _('Access tokens for private engines') %}
  169. {{ preferences_item_header(info, label, rtl, 'tokens') }}
  170. <input class="form-control" id="tokens" name="tokens" value='{{ preferences.tokens.get_value() }}'/>
  171. {{ preferences_item_footer(info, label, rtl) }}
  172. </div>
  173. </fieldset>
  174. </div>
  175. <div class="tab-pane active_if_nojs" id="tab_ui">
  176. <noscript>
  177. <h3>{{ _('User Interface') }}</h3>
  178. </noscript>
  179. <fieldset>
  180. <div class="container-fluid">
  181. {% if 'locale' not in locked_preferences %}
  182. {% set locale_label = _('Interface language') %}
  183. {% set locale_info = _('Change the language of the layout') %}
  184. {{ preferences_item_header(locale_info, locale_label, rtl, 'locale') }}
  185. <select class="form-control {{ custom_select_class(rtl)}}" name="locale" id="locale">
  186. {% for locale_id,locale_name in locales.items() | sort %}
  187. <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
  188. {% endfor %}
  189. </select>
  190. {{ preferences_item_footer(locale_info, locale_label, rtl) }}
  191. {% endif %}
  192. {% if 'theme' not in locked_preferences %}
  193. {% set theme_label = _('Themes') %}
  194. {% set theme_info = _('Change searx layout') %}
  195. {{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
  196. <select class="form-control {{ custom_select_class(rtl) }}" name="theme" id="theme">
  197. {% for name in themes %}
  198. <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
  199. {% endfor %}
  200. </select>
  201. {{ preferences_item_footer(theme_info, theme_label, rtl) }}
  202. {% endif %}
  203. {% if 'oscar-style' not in locked_preferences %}
  204. {{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl, 'oscar_style') }}
  205. <select class="form-control {{ custom_select_class(rtl) }}" name="oscar-style" id="oscar_style">
  206. <option value="logicodev" >Logicodev</option>
  207. <option value="pointhi" {% if preferences.get_value('oscar-style') == 'pointhi' %}selected="selected"{% endif %}>Pointhi</option>
  208. <option value="logicodev-dark" {% if preferences.get_value('oscar-style') == 'logicodev-dark' %}selected="selected"{% endif %}>Logicodev dark</option>
  209. </select>
  210. {{ preferences_item_footer(_('Choose style for this theme'), _('Style'), rtl) }}
  211. {% endif %}
  212. {% set label = _('Show advanced settings') %}
  213. {% set info = _('Show advanced settings panel in the home page by default') %}
  214. {{ preferences_item_header(info, label, rtl, 'advanced_search') }}
  215. <select class="form-control {{ custom_select_class(rtl) }}" name="advanced_search" id="advanced_search">
  216. <option value="1" {% if preferences.get_value('advanced_search')%}selected="selected"{% endif %}>{{ _('On') }}</option>
  217. <option value="0" {% if not preferences.get_value('advanced_search')%}selected="selected"{% endif %}>{{ _('Off')}}</option>
  218. </select>
  219. {{ preferences_item_footer(info, label, rtl) }}
  220. {% if 'results_on_new_tab' not in locked_preferences %}
  221. {% set label = _('Results on new tabs') %}
  222. {% set info = _('Open result links on new browser tabs') %}
  223. {{ preferences_item_header(info, label, rtl, 'results_on_new_tab') }}
  224. <select class="form-control {{ custom_select_class(rtl) }}" name="results_on_new_tab" id="results_on_new_tab">
  225. <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
  226. <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
  227. </select>
  228. {{ preferences_item_footer(info, label, rtl) }}
  229. {% endif %}
  230. {{ plugin_of_category('ui' )}}
  231. </div>
  232. </fieldset>
  233. </div>
  234. <div class="tab-pane active_if_nojs" id="tab_privacy">
  235. <noscript>
  236. <h3>{{ _('Privacy') }}</h3>
  237. </noscript>
  238. <fieldset>
  239. <div class="container-fluid">
  240. {% if 'method' not in locked_preferences %}
  241. {% set method_label = _('Method') %}
  242. {% set method_info = _('Change how forms are submited, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') %}
  243. {{ preferences_item_header(method_info, method_label, rtl, 'method') }}
  244. <select class="form-control {{ custom_select_class(rtl) }}" name="method" id="method">
  245. <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
  246. <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
  247. </select>
  248. {{ preferences_item_footer(method_info, method_label, rtl) }}
  249. {% endif %}
  250. {% if 'image_proxy' not in locked_preferences %}
  251. {% set image_proxy_label = _('Image proxy') %}
  252. {% set image_proxy_info = _('Proxying image results through searx') %}
  253. {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
  254. <select class="form-control {{ custom_select_class(rtl) }}" name="image_proxy" id="image_proxy">
  255. <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
  256. <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
  257. </select>
  258. {{ preferences_item_footer(image_proxy_info, image_proxy_label, rtl) }}
  259. {% endif %}
  260. {{ plugin_of_category('privacy' )}}
  261. </div>
  262. </fieldset>
  263. </div>
  264. <div class="tab-pane active_if_nojs" id="tab_engine">
  265. <!-- Nav tabs -->
  266. <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">
  267. {% for categ in all_categories %}
  268. <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li>
  269. {% endfor %}
  270. </ul>
  271. <noscript>
  272. <h3>{{ _('Engines') }}</h3>
  273. </noscript>
  274. <!-- Tab panes -->
  275. <div class="tab-content">
  276. <div class="hide_if_nojs">
  277. <p class="text-{% if rtl %}left{% else %}right{% endif %}">
  278. <button type="button" class="btn btn-default btn-success" id="allow-all-engines">{{ _("Allow all") }}</button>
  279. <button type="button" class="btn btn-default btn-danger" id="disable-all-engines">{{ _("Disable all") }}</button>
  280. </p>
  281. </div>
  282. {% for categ in all_categories %}
  283. <noscript><label>{{ _(categ) }}</label>
  284. </noscript>
  285. <div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}">
  286. <div class="container-fluid">
  287. <fieldset>
  288. <div class="table-responsive">
  289. <table class="table table-hover table-condensed table-striped">
  290. <tr>
  291. {% if not rtl %}
  292. <th scope="col">{{ _("Allow") }}</th>
  293. <th scope="col">{{ _("Engine name") }}</th>
  294. <th scope="col">{{ _("Shortcut") }}</th>
  295. <th scope="col" style="width: 10rem">{{ _("Selected language") }}</th>
  296. <th scope="col" style="width: 10rem">{{ _("SafeSearch") }}</th>
  297. <th scope="col" style="width: 10rem">{{ _("Time range") }}</th>
  298. <th scope="col">{{ _("Response time") }}</th>
  299. <th scope="col" class="text-right" style="width: 7rem">{{ _("Max time") }}</th>
  300. <th scope="col" class="text-right" style="width: 7rem">{{ _("Reliablity") }}</th>
  301. {% else %}
  302. <th scope="col">{{ _("Reliablity") }}</th>
  303. <th scope="col">{{ _("Max time") }}</th>
  304. <th scope="col" class="text-right">{{ _("Response time") }}</th>
  305. <th scope="col" class="text-right">{{ _("Time range") }}</th>
  306. <th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
  307. <th scope="col" class="text-right">{{ _("Selected language") }}</th>
  308. <th scope="col" class="text-right">{{ _("Shortcut") }}</th>
  309. <th scope="col" class="text-right">{{ _("Engine name") }}</th>
  310. <th scope="col" class="text-right">{{ _("Allow") }}</th>
  311. {% endif %}
  312. </tr>
  313. {% for search_engine in engines_by_category[categ] %}
  314. {% if not search_engine.private %}
  315. <tr>
  316. {% if not rtl %}
  317. <td class="onoff-checkbox">
  318. {{- checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) -}}
  319. </td>
  320. <th scope="row"><span aria-labelledby="{{ 'tooltip_' + categ + '_' + search_engine.name }}">
  321. {%- if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif -%}
  322. {{- search_engine.name -}}</span>
  323. {{- engine_about(search_engine, 'tooltip_' + categ + '_' + search_engine.name) -}}
  324. </th>
  325. <td class="name">{{ shortcuts[search_engine.name] }}</td>
  326. <td>{{ support_toggle(supports[search_engine.name]['supports_selected_language']) }}</td>
  327. <td>{{ support_toggle(supports[search_engine.name]['safesearch']) }}</td>
  328. <td>{{ support_toggle(supports[search_engine.name]['time_range_support']) }}</td>
  329. {{ engine_time(search_engine.name, 'text-right') }}
  330. <td class="text-right {{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{% if stats[search_engine.name]['warn_timeout'] %}{{ icon('exclamation-sign') }} {% endif %}{{ search_engine.timeout }}</td>
  331. {{ engine_reliability(search_engine.name, 'text-right ') }}
  332. {% else %}
  333. {{ engine_reliability(search_engine.name, 'text-left') }}
  334. <td class="text-left {{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}</td>
  335. {{ engine_time(search_engine.name, 'text-left') }}
  336. <td>{{ support_toggle(supports[search_engine.name]['time_range_support']) }}</td>
  337. <td>{{ support_toggle(supports[search_engine.name]['safesearch']) }}</td>
  338. <td>{{ support_toggle(supports[search_engine.name]['supports_selected_language']) }}</td>
  339. <td>{{ shortcuts[search_engine.name] }}</td>
  340. <th scope="row"><span>{% if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif %}{{ search_engine.name }}</span>{{ engine_about(search_engine) }}</th>
  341. <td class="onoff-checkbox">
  342. {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
  343. </td>
  344. {% endif %}
  345. </tr>
  346. {% endif %}
  347. {% endfor %}
  348. </table>
  349. </div>
  350. </fieldset>
  351. </div>
  352. </div>
  353. {% endfor %}
  354. </div>
  355. </div>
  356. <div class="tab-pane active_if_nojs" id="tab_query">
  357. <noscript>
  358. <h3>{{ _('Query') }}</h3>
  359. </noscript>
  360. {% if answerers %}
  361. <table class="table table-striped">
  362. <thead>
  363. <tr>
  364. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Allow') }}</th>
  365. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Keywords') }}</th>
  366. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Name') }}</th>
  367. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Description') }}</th>
  368. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Examples') }}</th>
  369. </tr>
  370. </thead>
  371. <tbody>
  372. <td></td>
  373. <th scope="colgroup" colspan="4">{{ _('This is the list of searx\'s instant answering modules.') }}</th>
  374. {% for answerer in answerers %}
  375. <tr>
  376. <td></td>
  377. <td>{{ answerer.keywords|join(', ') }}</td>
  378. <td>{{ answerer.info.name }}</td>
  379. <td>{{ answerer.info.description }}</td>
  380. <td>{{ answerer.info.examples|join(', ') }}</td>
  381. </tr>
  382. {% endfor %}
  383. </tbody>
  384. <tbody>
  385. <td></td>
  386. <th scope="colgroup" colspan="4">{{ _('This is the list of plugins.') }}</th>
  387. {%- for plugin in plugins -%}
  388. {%- if plugin.preference_section == 'query' -%}
  389. <tr>
  390. <td>{{- checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}</td>
  391. <td>{{ plugin.query_keywords|join(', ') }}</td>
  392. <td>{{ _(plugin.name) }}</td>
  393. <td>{{ _(plugin.description) }}</td>
  394. <td>{{ plugin.query_examples }}</td>
  395. </tr>
  396. {%- endif -%}
  397. {%- endfor -%}
  398. </tbody>
  399. </table>
  400. {% endif %}
  401. </div>
  402. <div class="tab-pane active_if_nojs" id="tab_cookies">
  403. <noscript>
  404. <h3>{{ _('Cookies') }}</h3>
  405. </noscript>
  406. <p class="text-muted">
  407. {{ _('This is the list of cookies and their values searx is storing on your computer.') }}<br />
  408. {{ _('With that list, you can assess searx transparency.') }}<br />
  409. </p>
  410. {% if cookies %}
  411. <table class="table table-striped">
  412. <tr>
  413. <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Cookie name') }}</th>
  414. <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Value') }}</th>
  415. </tr>
  416. {% for cookie in cookies %}
  417. <tr>
  418. <td class="text-muted">{{ cookie }}</td>
  419. <td class="text-muted">{{ cookies[cookie] }}</td>
  420. </tr>
  421. {% endfor %}
  422. </table>
  423. {% else %}
  424. {% include 'oscar/messages/no_cookies.html' %}
  425. {% endif %}
  426. </div>
  427. </div>
  428. <p class="text-muted">
  429. {{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  430. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  431. </p>
  432. <p>
  433. {{ _('Search URL of the currently saved preferences') }}
  434. <small class="text-muted">({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }})</small>:
  435. </p>
  436. <div class="tab-pane">
  437. <input readonly="" class="form-control select-all-on-click cursor-text" type="url" value="{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&amp;q=%s{% endraw %}">
  438. <input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
  439. <a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
  440. <a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
  441. </div>
  442. </form>
  443. </div>
  444. {% endblock %}