PageSourceSearch

https://gallagherplasticsurgery.com/wp-content/plugins/before-afte…/gallery-frontend.min.js?ver=1759777073

js gallagherplasticsurgery.com collected 2026-09-28 13:31:19 UTC 3,752 bytes, 1 lines download raw bytes

1(()=>{document.addEventListener("DOMContentLoaded",function(){h(),w(),typeof galleryAjaxData<"u"&&galleryAjaxData.enableInfiniteScroll==="yes"&&b()});function h(){let n=document.querySelectorAll(".gallery__cases__case");!n||n.forEach(e=>{let o=e.querySelector(".patients-slider:not(.is-initialized)"),t=e.querySelector(".patients-thumbnail-slider:not(.is-initialized)");o&&t&&y(o,t)})}function y(n,e){if(!n||n.classList.contains("is-initialized"))return;if(!n.querySelectorAll(".splide__slide").length){console.warn("No slides found in main slider");return}n.style.visibility="visible";try{var t=new Splide(n,{type:"fade",rewind:!0,pagination:!1,drag:!1,arrows:!0});if(t.mount(),n.classList.add("is-initialized"),e&&!e.classList.contains("is-initialized")&&(e.style.visibility="visible",e.querySelectorAll(".splide__slide").length)){var i=new Splide(e,{fixedWidth:100,fixedHeight:60,rewind:!0,pagination:!1,arrows:!1,drag:!1,isNavigation:!0,breakpoints:{600:{fixedWidth:60,fixedHeight:44}}});i.mount(),e.classList.add("is-initialized"),t.sync(i)}}catch(r){console.error("Error initializing Splide:",r),t&&typeof t.destroy=="function"&&t.destroy(),i&&typeof i.destroy=="function"&&i.destroy()}}function w(){var n=document.querySelector("body"),e=document.querySelector("main.gallery"),o=document.getElementById("adult-check-modal");if(!!o){var t=document.getElementById("confirm-age"),i=document.getElementById("deny-age");n.classList.add("scroll-lock"),e.classList.add("blur-background"),L("adultConfirmed")!=="true"&&(o.style.display="block",e.classList.add("blur-background"),t.focus()),t.addEventListener("click",function(){o.style.display="none",n.classList.remove("scroll-lock"),e.classList.remove("blur-background")}),i.addEventListener("click",function(){let r="/"+new URL(location.href).pathname.split("/")[1]+"/";window.location.href=r})}}function b(){if(typeof galleryAjaxData>"u"){console.log("Gallery Ajax Data not found - stopping infinite scroll init");return}let n=1,e=!1,o=!0,t=document.getElementById("load-more-trigger"),i=document.getElementById("back-to-top"),r=document.querySelector(".gallery__cases");if(!t||!i||!r){console.log("Missing required elements - stopping infinite scroll init");return}window.addEventListener("scroll",()=>{window.pageYOffset>300?i.classList.add("visible"):i.classList.remove("visible")}),i.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})});async function g(){if(!e){e=!0,n++;try{let s=await fetch(galleryAjaxData.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"load_more_patients",nonce:galleryAjaxData.nonce,page:n,term_id:galleryAjaxData.termId,gallery_style:galleryAjaxData.galleryStyle,posts_per_page:9})});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);let l=await s.json();if(l.success&&l.data.html){let f=document.createElement("div");f.innerHTML=l.data.html;let m=f.querySelectorAll(".gallery__cases__case");for(let d of m)r.appendChild(d),await new Promise(v=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{let a=d.querySelector(".patients-slider"),c=d.querySelector(".patients-thumbnail-slider");a&&(a.style.visibility="visible"),c&&(c.style.visibility="visible"),a&&c&&y(a,c),v()})})});o=l.data.hasMore,o||(u.unobserve(t),t.style.display="none")}}catch(s){console.error("Error loading more posts:",s)}finally{e=!1}}}let p={root:null,rootMargin:"100px",threshold:.1},u=new IntersectionObserver(s=>{s.forEach(l=>{l.isIntersecting&&!e&&o&&g()})},p);u.observe(t)}function L(n){for(var e=n+"=",o=document.cookie.split(";"),t=0;t<o.length;t++){for(var i=o[t];i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null}})();

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.