preferences.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. {% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %}
  2. {% from 'simple/icons.html' import icon_big %}
  3. {% extends "simple/page_with_header.html" %}
  4. {%- macro plugin_preferences(section) -%}
  5. {%- for plugin in plugins -%}
  6. {%- if plugin.preference_section == section -%}
  7. <fieldset>{{- '' -}}
  8. <legend>{{ _(plugin.name) }}</legend>{{- '' -}}
  9. <div class="value">
  10. {{- checkbox_onoff('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}
  11. </div>{{- '' -}}
  12. <div class="description">
  13. {{- _(plugin.description) -}}
  14. </div>{{- '' -}}
  15. </fieldset>
  16. {%- endif -%}
  17. {%- endfor -%}
  18. {%- endmacro -%}
  19. {% macro engine_about(search_engine) -%}
  20. {% if search_engine.about is defined %}
  21. {% set about = search_engine.about %}
  22. <div class="engine-tooltip" role="tooltip">{{- "" -}}
  23. <p class="engine-description"></p>{{- "" -}}
  24. <p><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></p>
  25. {%- 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 -%}
  26. {%- if search_engine.enable_http %}<p>{{ icon_big('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%}
  27. {%- if reliabilities.get(search_engine.name, {}).errors or reliabilities.get(search_engine.name, {}).checker -%}
  28. <a href="{{ url_for('stats', engine=search_engine.name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
  29. {{ _('View error logs and submit a bug report') -}}
  30. </a>
  31. {%- endif -%}
  32. <p><span class="right">{{ _("!bang for this engine") }}</span>{% for bang in [search_engine.name] + [search_engine.shortcut] %}<span class="bang"> {{ '!' + bang.replace(' ', '_') }}</span>{% endfor %}</p>
  33. <p><span class="right">{{ _("!bang for its categories") }}</span>{% for bang in search_engine.categories %}<span class="bang"> {{ '!' + bang.replace(' ', '_') }}</span>{% endfor %}</p>
  34. </div>
  35. {%- endif -%}
  36. {%- endmacro %}
  37. {%- macro engine_time(engine_name) -%}
  38. <td class="{{ label }}">{{- "" -}}
  39. {%- if stats[engine_name].time != None -%}
  40. <span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
  41. <span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
  42. {%- if max_rate95 is not none and max_rate95 > 0 -%}
  43. <div class="stacked-bar-chart-median bar{{ (100 * (stats[engine_name].time / max_rate95))|round }}"></div>{{- "" -}}
  44. <div class="stacked-bar-chart-rate80 bar{{ (100 * ((stats[engine_name].rate80 - stats[engine_name].time) / max_rate95))|round }}"></div>{{- "" -}}
  45. <div class="stacked-bar-chart-rate95 bar{{ (100 * ((stats[engine_name].rate95 - stats[engine_name].rate80) / max_rate95))|round }}"></div>{{- "" -}}
  46. <span class="stacked-bar-chart-rate100"></span>
  47. {%- endif -%}
  48. </span>{{- "" -}}
  49. <div class="engine-tooltip text-left" role="tooltip" id="{{engine_name}}_graph">{{- "" -}}
  50. <p>{{ _('Median') }}: {{ stats[engine_name].time }}</p>{{- "" -}}
  51. <p>{{ _('P80') }}: {{ stats[engine_name].rate80 }}</p>{{- "" -}}
  52. <p>{{ _('P95') }}: {{ stats[engine_name].rate95 }}</p>{{- "" -}}
  53. </div>
  54. {%- endif -%}
  55. </td>
  56. {%- endmacro -%}
  57. {%- macro engine_reliability(engine_name) -%}
  58. {% set r = reliabilities.get(engine_name, {}).get('reliablity', None) %}
  59. {% set checker_result = reliabilities.get(engine_name, {}).get('checker', []) %}
  60. {% set errors = reliabilities.get(engine_name, {}).get('errors', []) %}
  61. {% if r != None %}
  62. {% if r <= 50 %}{% set label = 'danger' %}
  63. {% elif r < 80 %}{% set label = 'warning' %}
  64. {% elif r < 90 %}{% set label = '' %}
  65. {% else %}{% set label = 'success' %}
  66. {% endif %}
  67. {% else %}
  68. {% set r = '' %}
  69. {% endif %}
  70. {% if checker_result or errors %}
  71. <td class="{{ label }} column-reliability">{{- "" -}}
  72. <a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}}
  73. <span aria-labelledby="{{engine_name}}_reliability">
  74. {{ icon_big('warning', 'The engine is not reliabled') }} {{ r -}}
  75. </span>{{- "" -}}
  76. </a>{{- "" -}}
  77. <div class="engine-tooltip" role="tooltip" id="{{engine_name}}_reliability">
  78. {%- if checker_result -%}
  79. <p>{{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}</p>
  80. {%- endif -%}
  81. {%- if errors %}<p>{{ _('Errors:') }}</p>{% endif -%}
  82. {%- for error in errors -%}
  83. <p>{{ error }} </p>{{- "" -}}
  84. {%- endfor -%}
  85. </div>{{- "" -}}
  86. </td>
  87. {%- else -%}
  88. <td class="{{ label }}">{% if r %}<span>{{ r }}</span>{% endif %}</td>
  89. {%- endif -%}
  90. {%- endmacro -%}
  91. {% block head %} {% endblock %}
  92. {% block linkto_preferences %}{% endblock %}
  93. {% block content %}
  94. <h1>{{ _('Preferences') }}</h1>
  95. <form id="search_form" method="post" action="{{ url_for('preferences') }}" autocomplete="off" class="reversed-checkbox">
  96. {{ tabs_open() }}
  97. {{ tab_header('maintab', 'general', _('General'), True) }}
  98. {% if 'categories' not in locked_preferences %}
  99. <fieldset>
  100. <legend>{{ _('Default categories') }}</legend>
  101. {% set display_tooltip = false %}
  102. {% include 'simple/categories.html' %}
  103. </fieldset>
  104. {% endif %}
  105. {% if 'language' not in locked_preferences %}
  106. <fieldset>
  107. <legend id="pref_language">{{ _('Search language') }}</legend>
  108. <p class="value">{{- '' -}}
  109. <select name='language' aria-labelledby="pref_language" aria-describedby="desc_language">{{- '' -}}
  110. <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }} [all]</option>
  111. <option value="auto" {% if current_language == 'auto' %}selected="selected"{% endif %}>{{ _('Auto-detect') }} [auto]</option>
  112. {%- for sxng_tag,lang_name,country_name,english_name,flag in sxng_locales | sort(attribute=1) -%}
  113. <option value="{{ sxng_tag }}" {% if sxng_tag == current_language %}selected="selected"{% endif %}>{% if flag %}{{ flag }} {% endif%} {{- lang_name }} {% if country_name %} - {{ country_name }} {% endif %} [{{sxng_tag}}]</option>
  114. {%- endfor -%}
  115. </select>{{- '' -}}
  116. </p>
  117. <div class="description" id="desc_language">
  118. {{- _('What language do you prefer for search?') }} {{ _('Choose Auto-detect to let SearXNG detect the language of your query.') -}}
  119. </div>
  120. </fieldset>
  121. {% endif %}
  122. {% if 'autocomplete' not in locked_preferences %}
  123. <fieldset>
  124. <legend id="pref_autocomplete">{{ _('Autocomplete') }}</legend>
  125. <p class="value">
  126. <select name="autocomplete" aria-labelledby="pref_autocomplete">
  127. <option value=""> - </option>
  128. {%- for backend in autocomplete_backends -%}
  129. <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
  130. {%- endfor -%}
  131. </select>
  132. </p>
  133. <div class="description">{{ _('Find stuff as you type') }}</div>
  134. </fieldset>
  135. {% endif %}
  136. {% if 'safesearch' not in locked_preferences %}
  137. <fieldset>
  138. <legend id="pref_safesearch">{{ _('SafeSearch') }}</legend>
  139. <p class="value">
  140. <select name='safesearch' aria-labelledby="pref_safesearch">
  141. <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
  142. <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
  143. <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
  144. </select>
  145. </p>
  146. <p class="description">{{ _('Filter content') }}</p>
  147. </fieldset>
  148. {% endif %}
  149. {{ plugin_preferences('general') }}
  150. {% if 'doi_resolver' not in locked_preferences %}
  151. <fieldset>
  152. <legend id="pref_doi_resolver">{{ _('Open Access DOI resolver') }}</legend>
  153. <p class="value">
  154. <select id='doi_resolver' name='doi_resolver' aria-labelledby="pref_doi_resolver">
  155. {%- for doi_resolver_name,doi_resolver_url in doi_resolvers.items() -%}
  156. <option value="{{ doi_resolver_name }}" {% if doi_resolver_url == current_doi_resolver %}selected="selected"{% endif %}>
  157. {{- doi_resolver_name }} - {{ doi_resolver_url -}}
  158. </option>
  159. {%- endfor -%}
  160. </select>
  161. </p>
  162. <div class="description"><!-- {{ _('Redirect to open-access versions of publications when available (plugin required)') }} --></div>
  163. </fieldset>
  164. {% endif %}
  165. <fieldset>
  166. <legend id="pref_tokens">{{ _('Engine tokens') }}</legend>
  167. <p class="value">
  168. <input name="tokens" aria-labelledby="pref_tokens" type="text" autocomplete="off" spellcheck="false" autocorrect="off" value='{{ preferences.tokens.get_value() }}'/>
  169. </p>
  170. <p class="description">{{ _('Access tokens for private engines') }}</p>
  171. </fieldset>
  172. {{ tab_footer() }}
  173. {{ tab_header('maintab', 'ui', _('User interface')) }}
  174. {% if 'locale' not in locked_preferences %}
  175. <fieldset>
  176. <legend id="pref_locale">{{ _('Interface language') }}</legend>
  177. <p class="value">
  178. <select name='locale' aria-labelledby="pref_locale">
  179. {%- for locale_id,locale_name in locales.items() | sort -%}
  180. <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
  181. {%- endfor -%}
  182. </select>
  183. </p>
  184. <div class="description">{{ _('Change the language of the layout') }}</div>
  185. </fieldset>
  186. {% endif %}
  187. {% if 'theme' not in locked_preferences %}
  188. <fieldset>
  189. <legend id="pref_theme">{{ _('Theme') }}</legend>
  190. <p class="value">
  191. <select name="theme" aria-labelledby="pref_theme">
  192. {%- for name in themes -%}
  193. <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
  194. {%- endfor -%}
  195. </select>
  196. </p>
  197. <div class="description">{{ _('Change SearXNG layout') }}</div>
  198. </fieldset>
  199. <fieldset>
  200. <legend id="pref_simple_style">{{ _('Theme style') }}</legend>
  201. <p class="value">
  202. <select name="simple_style" aria-labelledby="pref_simple_style">
  203. {%- for name in ['auto', 'light', 'dark'] -%}
  204. <option value="{{ name }}" {% if name == preferences.get_value('simple_style') %}selected="selected"{% endif %}>{{ _(name) }}</option>
  205. {%- endfor -%}
  206. </select>
  207. </p>
  208. <div class="description">{{ _('Choose auto to follow your browser settings') }}</div>
  209. </fieldset>
  210. <fieldset>
  211. <legend id="pref_center_alignment">{{ _('Center Alignment') }}</legend>
  212. <p class="value">
  213. <select name="center_alignment" aria-labelledby="pref_center_alignment">
  214. <option value="1" {% if preferences.get_value('center_alignment') %}selected="selected"{% endif %}>{{ _('On') }}</option>
  215. <option value="0" {% if not preferences.get_value('center_alignment') %}selected="selected"{% endif %}>{{ _('Off')}}</option>
  216. </select>
  217. </p>
  218. <div class="description">{{ _('Displays results in the center of the page (Oscar layout).') }}</div>
  219. </fieldset>
  220. {% endif %}
  221. {% if 'results_on_new_tab' not in locked_preferences %}
  222. <fieldset>
  223. <legend id="pref_results_on_new_tab">{{ _('Results on new tabs') }}</legend>
  224. <p class="value">
  225. <select name='results_on_new_tab' aria-labelledby="pref_results_on_new_tab">
  226. <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
  227. <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
  228. </select>
  229. </p>
  230. <div class="description">{{_('Open result links on new browser tabs') }}</div>
  231. </fieldset>
  232. {% endif %}
  233. {% if 'infinite_scroll' not in locked_preferences %}
  234. <fieldset>
  235. <legend>{{ _('Infinite scroll') }}</legend>
  236. <p class="value">
  237. <select name='infinite_scroll'>
  238. <option value="1" {% if infinite_scroll %}selected="selected"{% endif %}>{{ _('On') }}</option>
  239. <option value="0" {% if not infinite_scroll %}selected="selected"{% endif %}>{{ _('Off')}}</option>
  240. </select>
  241. </p>
  242. <div class="description">{{ _('Automatically load next page when scrolling to bottom of current page') }}</div>
  243. </fieldset>
  244. {% endif %}
  245. {{ plugin_preferences('ui') }}
  246. {{ tab_footer() }}
  247. {{ tab_header('maintab', 'privacy', _('Privacy')) }}
  248. {% if 'method' not in locked_preferences %}
  249. <fieldset>
  250. <legend id="pref_method">{{ _('HTTP Method') }}</legend>
  251. <p class="value">
  252. <select name='method' aria-labelledby="pref_method">
  253. <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
  254. <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
  255. </select>
  256. </p>
  257. <div class="description">{{ _('Change how forms are submitted, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') }}</div>
  258. </fieldset>
  259. {% endif %}
  260. {% if 'image_proxy' not in locked_preferences %}
  261. <fieldset>
  262. <legend id="pref_image_proxy">{{ _('Image proxy') }}</legend>
  263. <p class="value">
  264. <select name='image_proxy' aria-labelledby="pref_image_proxy">
  265. <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
  266. <option value="0" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled') }}</option>
  267. </select>
  268. </p>
  269. <div class="description">{{ _('Proxying image results through SearXNG') }}</div>
  270. </fieldset>
  271. {% endif %}
  272. {% if 'query_in_title' not in locked_preferences %}
  273. <fieldset>
  274. <legend id="pref_query_in_title">{{ _("Query in the page's title") }}</legend>
  275. <p class="value">
  276. <select name='query_in_title' aria-labelledby="pref_query_in_title">
  277. <option value="1" {% if query_in_title %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
  278. <option value="0" {% if not query_in_title %}selected="selected"{% endif %}>{{ _('Disabled') }}</option>
  279. </select>
  280. </p>
  281. <div class="description">{{ _("When enabled, the result page's title contains your query. Your browser can record this title") }}</div>
  282. </fieldset>
  283. {% endif %}
  284. {{ plugin_preferences('privacy') }}
  285. {{ tab_footer() }}
  286. {{ tab_header('maintab', 'engines', _('Engines')) }}
  287. <p>{{ _('Currently used search engines') }}</p>
  288. {{ tabs_open() }}
  289. {% set ns = namespace(checked=true) %}
  290. {% for categ in categories_as_tabs + [DEFAULT_CATEGORY] %}
  291. {{ tab_header('enginetab', 'category' + categ, _(categ), ns.checked )}}
  292. {% set ns.checked = false %}
  293. {% if categ == DEFAULT_CATEGORY %}
  294. <p>{{_('This tab dues not exists in the user interface, but you can search in these engines by its !bangs.')}} <a href="{{ url_for('info', pagename='search-syntax') }}">&#9432;</a></p>
  295. {% endif %}
  296. <div class="scrollx">
  297. <table class="striped table_engines">
  298. <tr>{{- "" -}}
  299. <th class="engine_checkbox">{{ _("Allow") }}</th>{{- "" -}}
  300. <th class="name">{{ _("Engine name") }}</th>{{- "" -}}
  301. <th class="shortcut">{{ _("Bang") }}</th>{{- "" -}}
  302. <th>{{ _("Supports selected language") }}</th>{{- "" -}}
  303. <th>{{ _("SafeSearch") }}</th>{{- "" -}}
  304. <th>{{ _("Time range") }}</th>{{- "" -}}
  305. {%- if enable_metrics %}<th>{{ _("Response time") }}</th>{% endif -%}
  306. <th>{{ _("Max time") }}</th>{{- "" -}}
  307. {%- if enable_metrics %}<th>{{ _("Reliability") }}</th>{% endif -%}
  308. </tr>
  309. {% for group, group_bang, engines in engines_by_category[categ] | group_engines_in_tab %}
  310. {% if loop.length > 1 %}
  311. <tr>
  312. <th class="engine-group" colspan="2">{{_(group)}}</th>
  313. <th class="engine-group" colspan="7">{% if group_bang %}<span class="bang">{{group_bang}}</span>{% endif %}</th>
  314. </tr>{{- "" -}}
  315. {% endif %}
  316. {% for search_engine in engines %}
  317. {% if not search_engine.private %}
  318. {% set engine_id = 'engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_') %}
  319. <tr>{{- "" -}}
  320. <td>{{ checkbox_onoff(engine_id, (search_engine.name, categ) in disabled_engines) }}</td>{{- "" -}}
  321. <th class="name" data-engine-name="{{ search_engine.name }}">{% if search_engine.enable_http %}{{ icon_big('warning', 'No HTTPS') }}{% endif -%}
  322. <label for="{{ engine_id }}">
  323. {{- search_engine.name -}}
  324. {%- if search_engine.about and search_engine.about.language %}
  325. ({{search_engine.about.language | upper}})
  326. {%- endif -%}
  327. </label>
  328. {{- engine_about(search_engine) -}}
  329. </th>{{- "" -}}
  330. <td class="shortcut"><span class="bang">{{ '!' + shortcuts[search_engine.name] }}</span></td>{{- "" -}}
  331. <td>{{ checkbox(None, supports[search_engine.name]['supports_selected_language'], true) }}</td>{{- "" -}}
  332. <td>{{ checkbox(None, supports[search_engine.name]['safesearch'], true) }}</td>{{- "" -}}
  333. <td>{{ checkbox(None, supports[search_engine.name]['time_range_support'], true) }}</td>{{- "" -}}
  334. {%- if enable_metrics %}{{- engine_time(search_engine.name) -}}{% endif -%}
  335. <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>{{- "" -}}
  336. {%- if enable_metrics %}{{ engine_reliability(search_engine.name) -}}{% endif -%}
  337. </tr>
  338. {% endif %}
  339. {% endfor %}
  340. {% endfor %}
  341. </table>
  342. </div>
  343. {{ tab_footer() }}
  344. {% endfor %}
  345. {{ tabs_close() }}
  346. {{ tab_footer() }}
  347. {{ tab_header('maintab', 'query', _('Special Queries')) }}
  348. {% if answerers %}
  349. <div class="scrollx">
  350. <table class="striped">
  351. <tr>
  352. <th>{{ _('Allow') }}</th>
  353. <th>{{ _('Keywords') }}</th>
  354. <th>{{ _('Name') }}</th>
  355. <th>{{ _('Description') }}</th>
  356. <th>{{ _('Examples') }}</th>
  357. </tr>
  358. <td></td>
  359. <th scope="colgroup" colspan="4">{{ _("This is the list of SearXNG's instant answering modules.") }}</th>
  360. {% for answerer in answerers %}
  361. <tr>
  362. <td></td>
  363. <td>{{ answerer.keywords|join(', ') }}</td>
  364. <td>{{ answerer.info.name }}</td>
  365. <td>{{ answerer.info.description }}</td>
  366. <td>{{ answerer.info.examples|join(', ') }}</td>
  367. </tr>
  368. {% endfor %}
  369. <td></td>
  370. <th scope="colgroup" colspan="4">{{ _('This is the list of plugins.') }}</th>
  371. {%- for plugin in plugins -%}
  372. {%- if plugin.preference_section == 'query' -%}
  373. <tr>
  374. <td>{{- checkbox_onoff('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}</td>
  375. <td>{{ plugin.query_keywords|join(', ') }}</td>
  376. <td>{{ _(plugin.name) }}</td>
  377. <td>{{ _(plugin.description) }}</td>
  378. <td>{{ plugin.query_examples }}</td>
  379. </tr>
  380. {%- endif -%}
  381. {%- endfor -%}
  382. </table>
  383. </div>
  384. {% endif %}
  385. {{ tab_footer() }}
  386. {{ tab_header('maintab', 'cookies', _('Cookies')) }}
  387. <p class="text-muted">{{- "" -}}
  388. {{- _('This is the list of cookies and their values SearXNG is storing on your computer.') }}<br />{{- "" -}}
  389. {{- _('With that list, you can assess SearXNG transparency.') }}<br />{{- "" -}}
  390. </p>
  391. {% if cookies %}
  392. <table class="cookies">
  393. <tr>{{- "" -}}
  394. <th>{{ _('Cookie name') }}</th>{{- "" -}}
  395. <th>{{ _('Value') }}</th>{{- "" -}}
  396. </tr>
  397. {% for cookie in cookies %}
  398. <tr>{{- "" -}}
  399. <td>{{ cookie }}</td>{{- "" -}}
  400. <td>{{ cookies[cookie] }}</td>{{- "" -}}
  401. </tr>
  402. {% endfor %}
  403. </table>
  404. {% else %}
  405. {% include 'simple/messages/no_cookies.html' %}
  406. {% endif %}
  407. <h4>{{ _('Search URL of the currently saved preferences') }} :</h4>
  408. <div class="selectable_url">
  409. <pre>{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&amp;q=%s{% endraw %}</pre>
  410. </div>
  411. <p class="small_font">{{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }}</p>
  412. <h4>{{ _('URL to restore your preferences in another browser') }} :</h4>
  413. <div class="selectable_url">
  414. <pre>{{ url_for('preferences', _external=True) }}?preferences={{ preferences_url_params|e }}&amp;save=1</pre>
  415. </div>
  416. <p class="small_font">{{ _('Specifying custom settings in the preferences URL can be used to sync preferences across devices.') }}</p>
  417. {{ tab_footer() }}
  418. {{ tabs_close() }}
  419. <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  420. <br />
  421. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  422. </p>
  423. <input type="submit" value="{{ _('Save') }}" />
  424. <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div>
  425. <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('index') }}">{{ _('Back') }}</a></div>
  426. </form>
  427. {% endblock %}