eGift Card
Rs 25
// Define blacklist and delay lists const YETT_BLACKLIST = [/f.vimeocdn.com/, /cdn.nfcube.com/]; const YETT_DELAYLIST = [/cdn-cookieyes.com/]; // Function to delay script loading function delayScriptLoading() { const delayedScripts = []; const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { Array.from(mutation.addedNodes).forEach((node) => { if (node.nodeType === 1 && node.tagName === "SCRIPT") { if (node.src && YETT_DELAYLIST.some((pattern) => pattern.test(node.src))) { delayedScripts.push(node.src); if (node.parentNode) { node.parentNode.removeChild(node); } } } }); }); }); observer.observe(document.documentElement, { childList: true, subtree: true, }); setTimeout(() => { delayedScripts.forEach((src) => { const newScript = document.createElement("script"); newScript.src = src; newScript.async = true; document.head.appendChild(newScript); }); }, 2000); } // Function to block script loading function blockScriptLoading() { const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { Array.from(mutation.addedNodes).forEach((node) => { if (node.nodeType === 1 && node.tagName === "SCRIPT") { if (node.src && YETT_BLACKLIST.some((pattern) => pattern.test(node.src))) { node.type = "javascript/blocked"; node.addEventListener("beforescriptexecute", (event) => { if (node.getAttribute("type") === "javascript/blocked") { event.preventDefault(); } node.removeEventListener("beforescriptexecute", arguments.callee); }); if (node.parentNode) { node.parentNode.removeChild(node); } } } }); }); }); observer.observe(document.documentElement, { childList: true, subtree: true, }); } // Function to change image loading attribute function changeImageLoadingAttribute() { setTimeout(() => { const images = document.querySelectorAll("img"); images.forEach((img) => { if (img.getAttribute("loading") == "lazy" || !img.getAttribute("loading")) { img.setAttribute("loading", "eager"); } }); }, 1500); } // Call the functions delayScriptLoading(); blockScriptLoading(); changeImageLoadingAttribute();
Rs 25