preferences.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  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. {%- block title %}{{ _('preferences') }} - {% endblock -%}
  77. {% block content %}
  78. <div>
  79. <h1>{{ _('Preferences') }}</h1>
  80. <form method="post" action="{{ url_for('preferences') }}" id="search_form">
  81. <!-- Nav tabs -->
  82. <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">
  83. <li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{ _('General') }}</a></li>
  84. <li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li>
  85. <li><a href="#tab_plugins" role="tab" data-toggle="tab">{{ _('Plugins') }}</a></li>
  86. {% if answerers %}<li><a href="#tab_answerers" role="tab" data-toggle="tab">{{ _('Answerers') }}</a></li>{% endif %}
  87. <li><a href="#tab_cookies" role="tab" data-toggle="tab">{{ _('Cookies') }}</a></li>
  88. </ul>
  89. <!-- Tab panes -->
  90. <noscript>
  91. <h3>{{ _('General') }}</h3>
  92. </noscript>
  93. <div class="tab-content">
  94. <div class="tab-pane active" id="tab_general">
  95. <fieldset>
  96. <div class="container-fluid">
  97. {% if 'categories' not in locked_preferences %}
  98. <div class="row form-group">
  99. {% if rtl %}
  100. <div class="col-sm-11 col-md-10">
  101. {% include 'oscar/categories.html' %}
  102. </div>
  103. <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
  104. {% else %}
  105. <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
  106. <div class="col-sm-11 col-md-10 search-categories">
  107. {% include 'oscar/categories.html' %}
  108. </div>
  109. {% endif %}
  110. </div>
  111. {% endif %}
  112. {% if 'language' not in locked_preferences %}
  113. {% set language_label = _('Search language') %}
  114. {% set language_info = _('What language do you prefer for search?') %}
  115. {{ preferences_item_header(language_info, language_label, rtl, 'language') }}
  116. {% include 'oscar/languages.html' %}
  117. {{ preferences_item_footer(language_info, language_label, rtl) }}
  118. {% endif %}
  119. {% if 'locale' not in locked_preferences %}
  120. {% set locale_label = _('Interface language') %}
  121. {% set locale_info = _('Change the language of the layout') %}
  122. {{ preferences_item_header(locale_info, locale_label, rtl, 'locale') }}
  123. <select class="form-control {{ custom_select_class(rtl)}}" name="locale" id="locale">
  124. {% for locale_id,locale_name in locales.items() | sort %}
  125. <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
  126. {% endfor %}
  127. </select>
  128. {{ preferences_item_footer(locale_info, locale_label, rtl) }}
  129. {% endif %}
  130. {% if 'autocomplete' not in locked_preferences %}
  131. {% set autocomplete_label = _('Autocomplete') %}
  132. {% set autocomplete_info = _('Find stuff as you type') %}
  133. {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl, 'autocomplete') }}
  134. <select class="form-control {{ custom_select_class(rtl) }}" name="autocomplete" id="autocomplete">
  135. <option value=""> - </option>
  136. {% for backend in autocomplete_backends %}
  137. <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
  138. {% endfor %}
  139. </select>
  140. {{ preferences_item_footer(autocomplete_info, autocomplete_label, rtl) }}
  141. {% endif %}
  142. {% if 'image_proxy' not in locked_preferences %}
  143. {% set image_proxy_label = _('Image proxy') %}
  144. {% set image_proxy_info = _('Proxying image results through searx') %}
  145. {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
  146. <select class="form-control {{ custom_select_class(rtl) }}" name="image_proxy" id="image_proxy">
  147. <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
  148. <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
  149. </select>
  150. {{ preferences_item_footer(image_proxy_info, image_proxy_label, rtl) }}
  151. {% endif %}
  152. {% if 'method' not in locked_preferences %}
  153. {% set method_label = _('Method') %}
  154. {% 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>') %}
  155. {{ preferences_item_header(method_info, method_label, rtl, 'method') }}
  156. <select class="form-control {{ custom_select_class(rtl) }}" name="method" id="method">
  157. <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
  158. <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
  159. </select>
  160. {{ preferences_item_footer(method_info, method_label, rtl) }}
  161. {% endif %}
  162. {% if 'safesearch' not in locked_preferences %}
  163. {% set safesearch_label = _('SafeSearch') %}
  164. {% set safesearch_info = _('Filter content') %}
  165. {{ preferences_item_header(safesearch_info, safesearch_label, rtl, 'safesearch') }}
  166. <select class="form-control {{ custom_select_class(rtl) }}" name="safesearch" id="safesearch">
  167. <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
  168. <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
  169. <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
  170. </select>
  171. {{ preferences_item_footer(safesearch_info, safesearch_label, rtl) }}
  172. {% endif %}
  173. {% if 'theme' not in locked_preferences %}
  174. {% set theme_label = _('Themes') %}
  175. {% set theme_info = _('Change searx layout') %}
  176. {{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
  177. <select class="form-control {{ custom_select_class(rtl) }}" name="theme" id="theme">
  178. {% for name in themes %}
  179. <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
  180. {% endfor %}
  181. </select>
  182. {{ preferences_item_footer(theme_info, theme_label, rtl) }}
  183. {% endif %}
  184. {% if 'oscar-style' not in locked_preferences %}
  185. {{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl, 'oscar_style') }}
  186. <select class="form-control {{ custom_select_class(rtl) }}" name="oscar-style" id="oscar_style">
  187. <option value="logicodev" >Logicodev</option>
  188. <option value="pointhi" {% if preferences.get_value('oscar-style') == 'pointhi' %}selected="selected"{% endif %}>Pointhi</option>
  189. <option value="logicodev-dark" {% if preferences.get_value('oscar-style') == 'logicodev-dark' %}selected="selected"{% endif %}>Logicodev dark</option>
  190. </select>
  191. {{ preferences_item_footer(_('Choose style for this theme'), _('Style'), rtl) }}
  192. {% endif %}
  193. {% if 'results_on_new_tab' not in locked_preferences %}
  194. {% set label = _('Results on new tabs') %}
  195. {% set info = _('Open result links on new browser tabs') %}
  196. {{ preferences_item_header(info, label, rtl, 'results_on_new_tab') }}
  197. <select class="form-control {{ custom_select_class(rtl) }}" name="results_on_new_tab" id="results_on_new_tab">
  198. <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
  199. <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
  200. </select>
  201. {{ preferences_item_footer(info, label, rtl) }}
  202. {% endif %}
  203. {% set label = _('Show advanced settings') %}
  204. {% set info = _('Show advanced settings panel in the home page by default') %}
  205. {{ preferences_item_header(info, label, rtl, 'advanced_search') }}
  206. <select class="form-control {{ custom_select_class(rtl) }}" name="advanced_search" id="advanced_search">
  207. <option value="1" {% if preferences.get_value('advanced_search')%}selected="selected"{% endif %}>{{ _('On') }}</option>
  208. <option value="0" {% if not preferences.get_value('advanced_search')%}selected="selected"{% endif %}>{{ _('Off')}}</option>
  209. </select>
  210. {{ preferences_item_footer(info, label, rtl) }}
  211. {% if 'doi_resolver' not in locked_preferences %}
  212. {% set label = _('Open Access DOI resolver') %}
  213. {% set info = _('Redirect to open-access versions of publications when available (plugin required)') %}
  214. {{ preferences_item_header(info, label, rtl, 'doi_resolver') }}
  215. <select class="form-control {{ custom_select_class(rtl) }}" name="doi_resolver" id="doi_resolver">
  216. {% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
  217. <option value="{{ doi_resolver_name }}" {% if doi_resolver_url == current_doi_resolver %}selected="selected"{% endif %}>
  218. {{ doi_resolver_name }} - {{ doi_resolver_url }}
  219. </option>
  220. {% endfor %}
  221. </select>
  222. {{ preferences_item_footer(info, label, rtl) }}
  223. {% endif %}
  224. {% set label = _('Engine tokens') %}
  225. {% set info = _('Access tokens for private engines') %}
  226. {{ preferences_item_header(info, label, rtl, 'tokens') }}
  227. <input class="form-control" id="tokens" name="tokens" value='{{ preferences.tokens.get_value() }}'/>
  228. {{ preferences_item_footer(info, label, rtl) }}
  229. </div>
  230. </fieldset>
  231. </div>
  232. <div class="tab-pane active_if_nojs" id="tab_engine">
  233. <!-- Nav tabs -->
  234. <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">
  235. {% for categ in all_categories %}
  236. <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li>
  237. {% endfor %}
  238. </ul>
  239. <noscript>
  240. <h3>{{ _('Engines') }}</h3>
  241. </noscript>
  242. <!-- Tab panes -->
  243. <div class="tab-content">
  244. <div class="hide_if_nojs">
  245. <p class="text-{% if rtl %}left{% else %}right{% endif %}">
  246. <button type="button" class="btn btn-default btn-success" id="allow-all-engines">{{ _("Allow all") }}</button>
  247. <button type="button" class="btn btn-default btn-danger" id="disable-all-engines">{{ _("Disable all") }}</button>
  248. </p>
  249. </div>
  250. {% for categ in all_categories %}
  251. <noscript><label>{{ _(categ) }}</label>
  252. </noscript>
  253. <div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}">
  254. <div class="container-fluid">
  255. <fieldset>
  256. <div class="table-responsive">
  257. <table class="table table-hover table-condensed table-striped">
  258. <tr>
  259. {% if not rtl %}
  260. <th scope="col">{{ _("Allow") }}</th>
  261. <th scope="col">{{ _("Engine name") }}</th>
  262. <th scope="col">{{ _("Shortcut") }}</th>
  263. <th scope="col" style="width: 10rem">{{ _("Selected language") }}</th>
  264. <th scope="col" style="width: 10rem">{{ _("SafeSearch") }}</th>
  265. <th scope="col" style="width: 10rem">{{ _("Time range") }}</th>
  266. <th scope="col">{{ _("Response time") }}</th>
  267. <th scope="col" class="text-right" style="width: 7rem">{{ _("Max time") }}</th>
  268. <th scope="col" class="text-right" style="width: 7rem">{{ _("Reliablity") }}</th>
  269. {% else %}
  270. <th scope="col">{{ _("Reliablity") }}</th>
  271. <th scope="col">{{ _("Max time") }}</th>
  272. <th scope="col" class="text-right">{{ _("Response time") }}</th>
  273. <th scope="col" class="text-right">{{ _("Time range") }}</th>
  274. <th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
  275. <th scope="col" class="text-right">{{ _("Selected language") }}</th>
  276. <th scope="col" class="text-right">{{ _("Shortcut") }}</th>
  277. <th scope="col" class="text-right">{{ _("Engine name") }}</th>
  278. <th scope="col" class="text-right">{{ _("Allow") }}</th>
  279. {% endif %}
  280. </tr>
  281. {% for search_engine in engines_by_category[categ] %}
  282. {% if not search_engine.private %}
  283. <tr>
  284. {% if not rtl %}
  285. <td class="onoff-checkbox">
  286. {{- checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) -}}
  287. </td>
  288. <th scope="row"><span aria-labelledby="{{ 'tooltip_' + categ + '_' + search_engine.name }}">
  289. {%- if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif -%}
  290. {{- search_engine.name -}}</span>
  291. {{- engine_about(search_engine, 'tooltip_' + categ + '_' + search_engine.name) -}}
  292. </th>
  293. <td class="name">{{ shortcuts[search_engine.name] }}</td>
  294. <td>{{ support_toggle(supports[search_engine.name]['supports_selected_language']) }}</td>
  295. <td>{{ support_toggle(supports[search_engine.name]['safesearch']) }}</td>
  296. <td>{{ support_toggle(supports[search_engine.name]['time_range_support']) }}</td>
  297. {{ engine_time(search_engine.name, 'text-right') }}
  298. <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>
  299. {{ engine_reliability(search_engine.name, 'text-right ') }}
  300. {% else %}
  301. {{ engine_reliability(search_engine.name, 'text-left') }}
  302. <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>
  303. {{ engine_time(search_engine.name, 'text-left') }}
  304. <td>{{ support_toggle(supports[search_engine.name]['time_range_support']) }}</td>
  305. <td>{{ support_toggle(supports[search_engine.name]['safesearch']) }}</td>
  306. <td>{{ support_toggle(supports[search_engine.name]['supports_selected_language']) }}</td>
  307. <td>{{ shortcuts[search_engine.name] }}</td>
  308. <th scope="row"><span>{% if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif %}{{ search_engine.name }}</span>{{ engine_about(search_engine) }}</th>
  309. <td class="onoff-checkbox">
  310. {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
  311. </td>
  312. {% endif %}
  313. </tr>
  314. {% endif %}
  315. {% endfor %}
  316. </table>
  317. </div>
  318. </fieldset>
  319. </div>
  320. </div>
  321. {% endfor %}
  322. </div>
  323. </div>
  324. <div class="tab-pane active_if_nojs" id="tab_plugins">
  325. <noscript>
  326. <h3>{{ _('Plugins') }}</h3>
  327. </noscript>
  328. <fieldset>
  329. <div class="container-fluid">
  330. {% for plugin in plugins %}
  331. {% if plugin.preference_section != 'onions' %}
  332. <div class="panel panel-default">
  333. <div class="panel-heading">
  334. <h3 class="panel-title">{{ _(plugin.name) }}</h3>
  335. </div>
  336. <div class="panel-body">
  337. <div class="col-xs-6 col-sm-4 col-md-6"><label for="{{'plugin_' + plugin.id}}">{{ _(plugin.description) }}</label></div>
  338. <div class="col-xs-6 col-sm-4 col-md-6">
  339. <div class="onoff-checkbox">
  340. {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}
  341. </div>
  342. </div>
  343. </div>
  344. </div>
  345. {% endif %}
  346. {% endfor %}
  347. </div>
  348. </fieldset>
  349. </div>
  350. {% if answerers %}
  351. <div class="tab-pane active_if_nojs" id="tab_answerers">
  352. <noscript>
  353. <h3>{{ _('Answerers') }}</h3>
  354. </noscript>
  355. <p class="text-muted">
  356. {{ _('This is the list of searx\'s instant answering modules.') }}
  357. </p>
  358. <table class="table table-striped">
  359. <tr>
  360. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Name') }}</th>
  361. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Keywords') }}</th>
  362. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Description') }}</th>
  363. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Examples') }}</th>
  364. </tr>
  365. {% for answerer in answerers %}
  366. <tr>
  367. <td>{{ answerer.info.name }}</td>
  368. <td>{{ answerer.keywords|join(', ') }}</td>
  369. <td>{{ answerer.info.description }}</td>
  370. <td>{{ answerer.info.examples|join(', ') }}</td>
  371. </tr>
  372. {% endfor %}
  373. </table>
  374. </div>
  375. {% endif %}
  376. <div class="tab-pane active_if_nojs" id="tab_cookies">
  377. <noscript>
  378. <h3>{{ _('Cookies') }}</h3>
  379. </noscript>
  380. <p class="text-muted">
  381. {{ _('This is the list of cookies and their values searx is storing on your computer.') }}<br />
  382. {{ _('With that list, you can assess searx transparency.') }}<br />
  383. </p>
  384. {% if cookies %}
  385. <table class="table table-striped">
  386. <tr>
  387. <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Cookie name') }}</th>
  388. <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Value') }}</th>
  389. </tr>
  390. {% for cookie in cookies %}
  391. <tr>
  392. <td class="text-muted">{{ cookie }}</td>
  393. <td class="text-muted">{{ cookies[cookie] }}</td>
  394. </tr>
  395. {% endfor %}
  396. </table>
  397. {% else %}
  398. {% include 'oscar/messages/no_cookies.html' %}
  399. {% endif %}
  400. </div>
  401. </div>
  402. <p class="text-muted">
  403. {{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  404. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  405. </p>
  406. <p>
  407. {{ _('Search URL of the currently saved preferences') }}
  408. <small class="text-muted">({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }})</small>:
  409. </p>
  410. <div class="tab-pane">
  411. <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 %}">
  412. <input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
  413. <a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
  414. <a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
  415. </div>
  416. </form>
  417. </div>
  418. {% endblock %}