Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/js/modules/ajax-search.min.js
Назад
((p,y)=>{"use strict";const b=new Map;p.on("themify_overlay_search_init",e=>{let r,l=e.closest(".tf_search_form")||y.tfId("searchform");if(l){const t=(l=l.closest(".tf_search_form")).tfTag("form")[0],s=!!t.closest(".tf_search_overlay"),c=t.querySelector('input[name="s"]'),o=new URL(t.action).searchParams,f=o.get("term"),i=o.get("post_type"),n=y.createElement("div"),_=y.createElement("div");if(n.className="tf_search_result tf_w tf_box tf_hide",_.className="tf_loader tf_hide",s){l=y.createElement("div");const m=y.createElement("div"),u=y.createElement("a"),v=y.createElement("span"),g=()=>{l.classList.toggle("search-active",0<c.value.length)};e.tfOn("click",e=>{e.preventDefault(),g(),l.classList.add("tf_fd_in"),c.focus(),y.body.style.overflowY="hidden",y.body.classList.add("searchform-slidedown")}),u.tfOn("click",e=>{e.preventDefault(),g(),r?.abort(),r=null,l.classList.remove("tf_fd_in"),y.body.style.overflowY="",y.body.classList.remove("searchform-slidedown")}),l.className="tf_search_lightbox tf_hide tf_w tf_box tf_opacity tf_h tf_scrollbar",m.className="tf_searchform_inner tf_opacity",u.className="tf_close_search tf_close",v.className="screen-reader-text",u.appendChild(v),l.append(m,u),t.after(l),m.appendChild(t)}else n.className+=" tf_scrollbar",n.setAttribute("tabindex","-1");c.after(n),c.before(_);const d=e=>{let s=e.getAttribute("href").replace("#",""),a=e.closest("li"),r=n.tfClass("tf_search_item");"all"===s&&(s="item");for(let t=r.length-1;-1<t;--t){let e=r[t].classList;e.remove("tf_fd_in"),e.add("tf_fd_out")}for(let e=a.parentNode.children,t=e.length-1;-1<t;--t)"LI"===e[t].tagName&&e[t].classList.remove("active");a.classList.add("active"),setTimeout(()=>{const t=n.tfClass("tf_view_button"),e=n.querySelector("#tf_result_link_"+s);for(let e=t.length-1;-1<e;--e)t[e].classList.add("tf_hide");e?.classList.remove("tf_hide");for(let t=r.length-1;-1<t;--t){let e=r[t].classList;e.contains("tf_search_"+s)?(e.remove("tf_hide","tf_fd_out"),e.add("tf_fd_in")):e.add("tf_hide")}},401)},h=(n.tfOn("click",e=>{const t=e.target;"A"===t.tagName&&t.closest(".tf_search_tab")&&(e.preventDefault(),d(t))}),{action:"themify_search_autocomplete"});i&&(h.post_type=i),f&&(h.term=f,h.tax=o.get("tax"));let a;c.tfOn("keyup",e=>{a&&clearTimeout(a),r&&r.abort();const t=e.currentTarget.value.trim(),s=()=>{n.innerHTML=b.get(t),(()=>{let e=n.querySelector(".tf_search_tab .active a");if(e){const t=(e=e.getAttribute("href"))?n.querySelector('.tf_search_tab a[href="'+e+'"]'):null;t&&d(t)}})()};t?a=setTimeout(async()=>{if(l.classList.add("search-active"),b.has(t))s();else{l.classList.add("tf_search_loading"),r=new AbortController,h.s=t;try{const e=await p.fetch(h,"text",{signal:r.signal});e&&(b.set(t,e),s())}catch(e){"AbortError"!==e.name&&console.error("Uh oh, an error!",e)}l.classList.remove("tf_search_loading"),r=null}},100):(l.classList.remove("search-active"),n.innerHTML="")},{passive:!0}).autocomplete="off",t.classList.remove("tf_hide"),c.value.trim()&&p.triggerEvent(c,"keyup")}})})(Themify,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка