PageSourceSearch

https://mfa.gov.af/wp-content/plugins/wp-optimize-premium/js/wpo-lazy-load-4-5-5.min.js?ver=4.5.5

js mfa.gov.af collected 2026-10-02 06:23:26 UTC 4,846 bytes, 1 lines download raw bytes

1function add_params_to_url(e,t,r){if(0===e.length)return e;try{var n=new URL(e),a=new URLSearchParams(n.search);return a.set(t,r),n.search=a.toString(),n.toString()}catch(o){return console.log("Error modifying url",o),e}}document.addEventListener("DOMContentLoaded",function(){var e="undefined"!=typeof MutationObserver;if(WPO_LazyLoad.update(),e){var t=new MutationObserver(function(e){e.forEach(function(e){WPO_LazyLoad.update(e.addedNodes)})}),r={childList:!0,subtree:!0},n=document.getElementsByTagName("body")[0];t.observe(n,r)}else window.addEventListener("load",function(){WPO_LazyLoad.deferred_call("update",WPO_LazyLoad.update)}),window.addEventListener("scroll",function(){WPO_LazyLoad.deferred_call("update",WPO_LazyLoad.update)}),window.addEventListener("resize",function(){WPO_LazyLoad.deferred_call("update",WPO_LazyLoad.update)}),document.getElementsByTagName("body")[0].addEventListener("post-load",function(){WPO_LazyLoad.deferred_call("update",WPO_LazyLoad.update)})});var WPO_Intersection_Observer=function(e,t){function r(e){d.push(e)}function n(e){var t;for(t in d)if(d.hasOwnProperty(t)&&e==d[t])return void delete d[t]}function a(){var t;for(t in d)d.hasOwnProperty(t)&&o(d[t])&&(e(d[t]),n(d[t]))}function o(e){var r=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;return r.top-t.offset<n&&r.bottom+t.offset>0}var d=[];return t=t||{offset:100},window.addEventListener("load",function(){WPO_LazyLoad.deferred_call("check",a)}),window.addEventListener("scroll",function(){WPO_LazyLoad.deferred_call("check",a)}),window.addEventListener("resize",function(){WPO_LazyLoad.deferred_call("check",a)}),{observe:r,unobserve:n}},WPO_LazyLoad=function(){function e(e){if(!l(e,_.loaded_class)){c(e,_.loaded_class),f.unobserve(e),u(e,_.observe_class);var r,n=e.tagName;if("picture"==n.toLowerCase())for(r in e.childNodes)e.childNodes.hasOwnProperty(r)&&t(e.childNodes[r]);else t(e)}}function t(e){if("undefined"!=typeof e.getAttribute){var t=e.getAttribute("data-src"),n=e.getAttribute("data-srcset"),a=e.getAttribute("data-background"),o=e.getAttribute("data-background-image");t&&(e.setAttribute("src",t),e.removeAttribute("data-src")),n&&(e.setAttribute("srcset",n),e.removeAttribute("data-srcset")),a&&(e.style.background=r(e.style.background,a.split(";")),e.removeAttribute("data-background")),o&&(e.style.backgroundImage=r(e.style.backgroundImage,o.split(";")),e.removeAttribute("data-background-image"))}}function r(e,t){var r=0;return e.replaceAll(/url\([^\)]*\)/gi,function(){return["url('",t[r++],"')"].join("")})}function n(t){var r;for(r in t)t.hasOwnProperty(r)&&t[r].isIntersecting&&e(t[r].target)}function a(e){return u(e,_.select_class),o(e)?(e=d(e),e.dataset.hasOwnProperty("src")&&(e.src=e.dataset.src),void(e.dataset.hasOwnProperty("srcset")&&(e.srcset=e.dataset.srcset))):void(l(e,_.observe_class)||(c(e,_.observe_class),f.observe(e)))}function o(e){e=d(e);const t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;return t.top>0&&t.top<r}function d(e){return"picture"===e.tagName.toLowerCase()?e.lastElementChild:e}function s(e){var t,r=e||Array.prototype.slice.call(_.container.getElementsByClassName(_.select_class));for(t in r)r.hasOwnProperty(t)&&(l(r[t],_.select_class)?a(r[t]):r[t].childNodes&&r[t].childNodes.length&&s(r[t].childNodes))}function i(e,t,r){r=r||200,p[e]=p[e]?p[e]+1:1,setTimeout(function(){var n=(new Date).getTime(),a=m[e]||0;p[e]--,(0===p[e]||a+r<n)&&(m[e]=n,t())},r)}function c(e,t){l(e,t)||(e.className?e.className+=" "+t:e.className=t)}function u(e,t){var r=new RegExp(["(^|\\s)",t,"(\\s|$)"].join(""));e.className=e.className.replace(r," ")}function l(e,t){var r=new RegExp(["(^|\\s)",t,"(\\s|$)"].join(""));return r.test(e.className)}var f,v="undefined"!=typeof IntersectionObserver,_={container:window.document,select_class:"lazyload",observe_class:"lazyload-observe",loaded_class:"lazyload-loaded"};f=v?new IntersectionObserver(n,{root:null,rootMargin:"0px",threshold:[.1]}):new WPO_Intersection_Observer(e);var p={},m={};return{update:s,deferred_call:i}}();document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll(".wpo_youtube_preview_container");e.forEach(function(e){e.parentElement.classList.add("wpo_youtube_preview_override_parent"),e.addEventListener("click",function(){var t=e.querySelector(".wpo_youtube_preview"),r=t.getAttribute("data-video-url"),n=wpo_parse_json(t.getAttribute("data-iframe-attr")),a=["data-vi
1deo-url","src"],o=document.createElement("iframe");o.setAttribute("src",add_params_to_url(r,"autoplay","1")),Object.keys(n).forEach(function(e){a.indexOf(e)===-1&&o.setAttribute(e,n[e])}),e.parentElement.classList.remove("wpo_youtube_preview_override_parent"),e.parentElement.replaceChild(o,e)})})});

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.