diff options
| author | Ivan Gabaldon <igabaldon@inetol.net> | 2025-12-07 13:26:01 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-07 13:26:01 +0000 |
| commit | 74ec225ad12cacd78dc33780f14e08b37b5ce748 (patch) | |
| tree | 2835feb38d510bbb73dd3ecd30eca5d7ca690dfd /searx/static/themes/simple/chunk/Q2W2fJLA.min.js | |
| parent | b5a1a092f1eaa96162b060f608eb8279763c55cb (diff) | |
[fix] themes: clear search input (#5540)
* [fix] themes: clear search input
Closes https://github.com/searxng/searxng/issues/5539
* [fix] themes: rebuild static
Diffstat (limited to 'searx/static/themes/simple/chunk/Q2W2fJLA.min.js')
| -rw-r--r-- | searx/static/themes/simple/chunk/Q2W2fJLA.min.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/static/themes/simple/chunk/Q2W2fJLA.min.js b/searx/static/themes/simple/chunk/Q2W2fJLA.min.js new file mode 100644 index 000000000..ab323f820 --- /dev/null +++ b/searx/static/themes/simple/chunk/Q2W2fJLA.min.js @@ -0,0 +1,2 @@ +import{n as e}from"../sxng-core.min.js";import{t}from"./gZqIRpW1.min.js";var n=t(`search`),r=t(`q`),i=t(`clear_search`),a=window.matchMedia(`(max-width: 50em)`).matches,o=document.querySelector(`main`)?.id===`main_results`,s=Array.from(document.querySelectorAll(`#categories_container button.category`));r.value.length===0&&i.classList.add(`empty`),a||o||r.focus(),a&&e(`focus`,r,()=>{requestAnimationFrame(()=>{let e=r.value.length;r.setSelectionRange(e,e),r.scrollLeft=r.scrollWidth})}),e(`input`,r,()=>{i.classList.toggle(`empty`,r.value.length===0)}),e(`click`,i,e=>{e.preventDefault(),r.value=``,r.focus(),i.classList.add(`empty`)});for(let t of s)e(`click`,t,e=>{if(e.shiftKey){e.preventDefault(),t.classList.toggle(`selected`);return}for(let e of s)e.classList.toggle(`selected`,e===t)});if(document.querySelector(`div.search_filters`)){let t=document.getElementById(`safesearch`);t&&e(`change`,t,()=>n.submit());let r=document.getElementById(`time_range`);r&&e(`change`,r,()=>n.submit());let i=document.getElementById(`language`);i&&e(`change`,i,()=>n.submit())}e(`submit`,n,e=>{if(e.preventDefault(),s.length>0){let e=t(`selected-categories`);e.value=s.filter(e=>e.classList.contains(`selected`)).map(e=>e.name.replace(`category_`,``)).join(`,`)}n.submit()}); +//# sourceMappingURL=Q2W2fJLA.min.js.map
\ No newline at end of file |