summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/js/preferences.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'searx/static/themes/simple/js/preferences.min.js')
-rw-r--r--searx/static/themes/simple/js/preferences.min.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/static/themes/simple/js/preferences.min.js b/searx/static/themes/simple/js/preferences.min.js
new file mode 100644
index 000000000..9e2077d19
--- /dev/null
+++ b/searx/static/themes/simple/js/preferences.min.js
@@ -0,0 +1,2 @@
+import{d as e,e as t,g as n}from"./searxng.core.min.js";let r;const i=async()=>{if(!r){try{let t=await e(`GET`,`engine_descriptions.json`);r=await t.json()}catch(e){console.error(`Error fetching engineDescriptions:`,e)}if(r)for(let[e,[t,i]]of Object.entries(r)){let r=document.querySelectorAll(`[data-engine-name="${e}"] .engine-description`),a=` (<i>${n.translations?.Source}:&nbsp;${i}</i>)`;for(let e of r)e.innerHTML=t+a}}},a=(e,t)=>{for(let n of t)n.offsetParent&&(n.checked=!e)},o=document.querySelectorAll(`[data-engine-name]`);for(let e of o)t(`mouseenter`,e,i);const s=document.querySelectorAll(`tbody input[type=checkbox][class~=checkbox-onoff]`),c=document.querySelectorAll(`.enable-all-engines`);for(let e of c)t(`click`,e,()=>a(!0,s));const l=document.querySelectorAll(`.disable-all-engines`);for(let e of l)t(`click`,e,()=>a(!1,s));const u=document.querySelector(`#copy-hash`);u&&t(`click`,u,async e=>{e.preventDefault();let{copiedText:t,hash:n}=u.dataset;if(t&&n)try{await navigator.clipboard.writeText(n),u.innerText=t}catch(e){console.error(`Failed to copy hash:`,e)}});
+//# sourceMappingURL=preferences.min.js.map \ No newline at end of file