PageSourceSearch

https://gw-project.org/wp-content/cache/perfmatters/gw-project.org…/a53473619345.52.min.js?v=dbc25d36e36e0acd

js gw-project.org collected 2026-10-02 06:57:28 UTC 2,565 bytes, 8 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){const bookGrid=document.getElementById("piotnetgrid");if(!bookGrid)return;addCategoryFilterAttributes();readOnlineDisplay();isNewDisplay();checkAndSetDisplay(".check_display");document.querySelectorAll(".piotnetgrid-facet--buttons").forEach(el=>updateTaxDescriptionVisibility(el));wp.hooks.addAction("piotnetgrid-facet-loaded","piotnetgrid",function(facets){addCategoryFilterAttributes();readOnlineDisplay();isNewDisplay();checkAndSetDisplay(".check_display");const container=(facets&&facets.container)||(facets&&facets[0])||null;if(container&&container.classList.contains("piotnetgrid-facet--buttons")){updateTaxDescriptionVisibility(container)}})});function updateTaxDescriptionVisibility(el){if(!el.classList.contains("piotnetgrid-facet--buttons"))return;const widget=el.closest(".elementor-widget-piotnetgrid_template");if(!widget)return;const descs=widget.querySelectorAll(".book-tax-description");const sel=el.querySelector(".piotnetgrid-facet-field:checked");const value=sel?sel.value:"";descs.forEach(d=>d.style.display=d.dataset.filter===value?"block":"none")}
2function readOnlineDisplay(){const base=window.location.origin+window.location.pathname;document.querySelectorAll(".piotnetgrid-card").forEach(card=>{const w=card.querySelector(".acf-books-read-online");if(!w)return;const a=w.querySelector("a");const show=a&&a.href.trim()&&(new URL(a.href).origin+new URL(a.href).pathname)!==base;w.style.display=show?"block":"none"})}
3function isNewDisplay(){document.querySelectorAll(".piotnetgrid-card").forEach(card=>{const flag=card.querySelector(".acf-books-is-new");const txt=card.querySelector(".acf-books-new-text");if(flag&&txt)txt.style.display=flag.textContent.trim()==="Yes"?"block":"none"})}
4function checkAndSetDisplay(sel){document.querySelectorAll(sel).forEach(el=>{if(!el.innerHTML.trim())el.style.display="none"})}
5function scrollToGridInMobile(){function go(){const t=document.querySelector(".above-piotnet-grid-description");if(!t)return;window.scrollTo({top:t.getBoundingClientRect().bottom+window.scrollY-100,behavior:"smooth"})}
6function onResize(){if(window.innerWidth<=767)go();}
7onResize();window.addEventListener("resize",onResize)}
8function addCategoryFilterAttributes(){const langs=["zh-hans","ar","in","fr","es","pt-br"];const re=new RegExp(`-(${langs.join("|")})$`);document.querySelectorAll(".piotnetgrid-facet__field-sub").forEach(sub=>{const f=sub.querySelector(".piotnetgrid-facet-field");if(!f)return;sub.setAttribute("filter-category",(f.value||"").replace(re,""))})}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.