PageSourceSearch

https://www.selfprotein.com/wp-content/plugins/popup-box-pro/public/assets/js/jsPopup.min.js

js selfprotein.com collected 2026-10-10 01:43:58 UTC 10,940 bytes, 10 lines download raw bytes

1/*! ========= INFORMATION ============================
2    - document:  Popup Box Pro
3	- brand:     Wow-Company
4	- brand-url: https://wow-company.com/
5    - store-url: https://wow-estore.com/
6	- author:    Dmytro Lobov
7	- url:       https://wow-estore.com/item/popup-box-pro/
8	- version:   3.4
9==================================================== */
10"use strict";const PopupBox=function(e,t,o){let n=Object.assign({block_page:!1,open_popup:"click",open_delay:"0",open_distance:"0",open_popupTrigger:"ds-open-popup-1",close_popupTrigger:"ds-close-popup",openSelectors:"",closeSelectors:"",auto_closePopup:!1,auto_closeDelay:"0",redirect_onClose:!1,redirect_URL:"",external_link_block:!1,formSubmit:{enabled:!1,time:3},redirect_target:"_blank",cookie_enable:!1,cookie_name:"ds-popup-1",cookie_days:"30",session_enable:!1,session_name:"ds-popup-1",active_url:{enable:!1,url:"popup=active"},referrer_url:{enable:!1,url:""},hash_url:{enable:!1,url:"#example"},loop:{start:5,end:10,counter:3},overlay_closesPopup:!0,overlay_isVisible:!0,overlay_animation:"fadeIn",overlay_css:{background:"rgba(0, 0, 0, .75)"},popup_zindex:"999",popup_esc:!0,popup_animation:"fadeIn",popup_position:"-center",popup_css:{width:"550px",height:"auto",padding:"15px",background:"#ffffff"},content_css:{padding:"15px"},close_isVisible:!0,close_Delayed:{enabled:!1,time:0},close_outer:!1,close_position:"-topRight",close_type:"-text",close_content:"Close",close_css:{"font-size":"12px",color:"#000000"},mobile_show:!0,mobile_breakpoint:"480px",mobile_css:{width:"100%"},video_enable:!1,video_autoPlay:!0,video_onClose:!0,tracking_open:{enable:!1,category:"Popup Box",action:"Popup Open"},tracking_close:{enable:!1,category:"Popup Box",action:"Popup Close"},geotargeting:!1,countries:[]},t),i="ds-popup",r=o,c=r.querySelector("."+i+"-wrapper"),s=r.querySelector("."+i+"-content"),l=function(){if(!n.overlay_isVisible)return!1;let e=document.createElement("div");return e.className=i+"-overlay fadeIn",r.prepend(e),r.querySelector("."+i+"-overlay")}(),a=function(){if(!n.close_isVisible)return!1;let e=document.createElement("button");return e.className=i+"-close",c.prepend(e),c.querySelector("."+i+"-close")}(),u=function(){let e=r.querySelector('iframe[src*="youtube.com"]'),t=r.querySelector('iframe[src*="vimeo.com"]');return e||(t||!1)}(),p=r.querySelector(".wpcf7, form.wpforms-form");n.block_page&&r.setAttribute("aria-modal","true");let d=1,f=s.innerHTML,_=function(e){const t=e.match(/\{\{(.*?)\}\}/g)?.map((e=>e.slice(2,-2)));return t||[]}(f),m=null;function g(e){let t="";for(let o in e)t+=o+":"+e[o]+";";return t}function b(){let e=1e3*parseInt(n.formSubmit.time);setTimeout((function(){L()}),e)}function y(){!function(){if(!l)return;l.style.cssText="z-index:"+(n.popup_zindex-3)+";"+g(n.overlay_css),l.setAttribute("data-ds-effect",n.overlay_animation)}(),function(){if(!s)return;s.style.cssText="z-index:"+(n.popup_zindex-1)+";"+g(n.content_css)}(),function(){if(!c)return;c.style.cssText="z-index:"+(n.popup_zindex-2)+";"+g(n.popup_css),c.classList.add(n.popup_position),c.setAttribute("data-ds-effect",n.popup_animation),window.screen.width<=parseInt(n.mobile_breakpoint)&&(c.style.cssText+=g(n.mobile_css));!function(){let e=getComputedStyle(c),t=e.height,o=e.width;if("auto"===t){c.style.display="block";let e=c.offsetHeight;c.style.display="",c.style.height=e+"px"}if("auto"===o){c.style.display="block";let e=c.offsetWidth;c.style.display="",c.style.width=e+"px"}switch(n.popup_position){case"-center":c.style.bottom="0",c.style.right="0";break;case"-bottomCenter":case"-topCenter":c.style.right="0"}}()}(),function(){if(!a)return;let e=0;!0===n.close_Delayed.enabled&&(e=n.close_Delayed.time);setTimeout((function(){a.classList.add(n.close_position,n.close_type),a.style.cssText="z-index:"+n.popup_zindex+";"+g(n.close_css),a.setAttribute("data-ds-close-text",n.close_content);const e=n.close_content||"Close popup";if(a.setAttribute("aria-label",e),n.close_outer&&a.classList.add("-outer"),"-tag"===n.close_type||"-icon"===n.close_type){let e=a.style.fontSize,t=parseInt(e)+5,o={width:t+"px",height:t+"px","line-height":t+"px"};a.style.cssText+=g(o)}}),1e3*e)}()}function h(){let e=n.open_popup;if(!0===function(){if(!0!==n.active_url.enable)return!0;const e=n.active_url.url.split("="),t=e[0],o=e[1],i=new URLSearchParams(document.location.search);if(i.get(t)===o)return!0;return!1}()&&!0===function(){if(!1===n.hash_url.enable)return!0;
10if(window.location.hash.includes(n.hash_url.url))return!0;return!1}()&&!0===function(){if(!0!==n.referrer_url.enable)return!0;if(""===n.referrer_url.url)return!0;return document.referrer.includes(n.referrer_url.url)}())switch(e){case"click":!function(){let e="."+n.open_popupTrigger+', a[href$="'+n.open_popupTrigger+'"]';void 0!==n.openSelectors&&""!==n.openSelectors.trim()&&(e+=`, ${n.openSelectors}`);document.addEventListener("click",(function(t){t.target.closest(e)&&(t.preventDefault(),x())}))}();break;case"hover":!function(){let e="."+n.open_popupTrigger+', a[href$="'+n.open_popupTrigger+'"]';void 0!==n.openSelectors&&""!==n.openSelectors.trim()&&(e+=`, ${n.openSelectors}`);document.addEventListener("mouseover",(function(t){t.target.closest(e)&&(t.preventDefault(),x())}))}();break;case"auto":setTimeout((function(){x()}),1e3*n.open_delay);break;case"scrolled":!function(){let e=!1;window.addEventListener("scroll",(function(t){let o=window.scrollY/(Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight);Math.round(100*o)>=n.open_distance&&(e||(x(),e=!0))}))}();break;case"rightclick":document.addEventListener("contextmenu",(function(e){return x(),!1}));break;case"selected":document.addEventListener("mouseup",(function(e){(window.getSelection&&window.getSelection()||document.getSelection&&document.getSelection()||document.selection&&document.selection.createRange&&document.selection.createRange().text).toString().length>2&&x()}));break;case"exit":!function(){let e=!1;document.addEventListener("mouseout",(function(t){t.clientY<=0&&!t.relatedTarget&&!e&&(x(),e=!0)}))}();break;case"loop":k();break;case"external_link":document.addEventListener("click",(function(e){const t=e.target.closest("a");t&&(t.classList.contains("skip-external-popup")||function(e){return e.hostname!==location.hostname}(t)&&(e.preventDefault(),x(),m=t))}))}}function v(){if(!m)return;const e=m.href;"_blank"===m.getAttribute("target")?window.open(e,"_blank"):window.location.href=e,m=null}function k(){const e=Math.floor(Math.random()*(parseInt(n.loop.end)-parseInt(n.loop.start)+1))+parseInt(n.loop.start);d>n.loop.counter||setTimeout((function(){x(),d++}),1e3*e)}function w(){if(_.length>0){let e=0;s.innerHTML=f.replace(/\{\{(.*?)\}\}/g,(function(t,o){e++;const n=function(e){const t=e.split("|"),o=Math.floor(Math.random()*t.length);return t[o].trim()}(o);return`<span class='popup-span-box-${e}'>${n}</span>`}))}}async function x(){if(!1!==function(){if(!n.mobile_show){if(window.screen.width<=parseInt(n.mobile_breakpoint))return!1}}()&&!(function(e){const t=localStorage.getItem(e);if(!t)return!1;const o=JSON.parse(t);if((new Date).getTime()>o.expiry)return localStorage.removeItem(e),!1;return!0}(n.cookie_name)&&n.cookie_enable||function(e){if(!sessionStorage.getItem(e))return!1;return!0}(n.session_name)&&n.session_enable)){if(!1!==n.geotargeting){if(!1===await new Promise(((e,t)=>{fetch("https://get.geojs.io/v1/ip/country.json").then((e=>e.json())).then((t=>{n.countries.includes(t.country)?e(!0):e(!1)})).catch((t=>{console.error("Error:",t),e(!1)}))})))return}if(r.classList.add("ds-active"),l&&(l.style.display="block"),w(),c.style.display="block",n.block_page){document.querySelectorAll("html, body").forEach((e=>{e.classList.add("no-scroll")})),r.focus(),function(){const e=document.body.children;for(let t of e)t.querySelector(".ds-popup")||t.classList.contains("ds-popup")||t.setAttribute("inert","")}()}!function(){if(!n.video_enable||!n.video_autoPlay||!u)return;let e=u.getAttribute("src");u.setAttribute("src",e+"?autoplay=1")}(),function(){if(!n.auto_closePopup)return;setTimeout((function(){L()}),1e3*n.auto_closeDelay)}(),function(){if(!n.tracking_open.enable)return!1;const e=n.tracking_open.action;let t={event_category:n.tracking_open.category};n.tracking_open.label&&(t.event_label=n.tracking_open.label);n.tracking_open.value&&(t.value=n.tracking_open.value);"function"==typeof window.gtag&&gtag("event",e,t)}()}}function S(){!function(){let e=r.querySelector("."+n.close_popupTrigger);e&&e.addEventListener("click",(e=>{L()}));if(void 0!==n.closeSelectors&&""!==n.closeSelectors.trim()){document.querySelectorAll(n.closeSelectors).forEac
10h((e=>{e.addEventListener("click",(e=>{e.preventDefault(),L()}))}))}}(),function(){if(!n.popup_esc)return;window.addEventListener("keydown",(function(e){"Escape"!==e.key&&"Esc"!==e.key||L()}))}(),function(){if(!n.overlay_closesPopup||!l)return;l.addEventListener("click",(function(){L()}))}(),a&&a.addEventListener("click",(()=>{L()}))}function L(){if(function(){if(!n.cookie_enable)return;const e=parseFloat(n.cookie_days),t=new Date,o=24*e*60*60*1e3,i={value:"yes",expiry:t.getTime()+o};localStorage.setItem(n.cookie_name,JSON.stringify(i))}(),function(){if(!n.session_enable)return;sessionStorage.setItem(n.session_name,"ok")}(),r.classList.remove("ds-active"),function(){if(!n.video_enable||!n.video_onClose||!u)return;let e=u.getAttribute("src");e=e.split("?")[0],u.setAttribute("src",e+"?autoplay=0")}(),function(){if(!n.tracking_close.enable)return!1;const e=n.tracking_close.action;let t={event_category:n.tracking_close.category};n.tracking_close.label&&(t.event_label=n.tracking_close.label),n.tracking_close.value&&(t.value=n.tracking_close.value),"function"==typeof window.gtag&&gtag("event",e,t)}(),setTimeout((function(){l&&(l.style.display=""),c.style.display=""}),600),n.block_page){document.querySelectorAll("html, body").forEach((e=>{e.classList.remove("no-scroll")})),function(){const e=document.body.children;for(let t of e)t.removeAttribute("inert")}()}!function(){if(!n.redirect_onClose)return;let e=n.redirect_URL;""!==e&&e.indexOf("http")>-1&&window.open(e,n.redirect_target)}(),"loop"===n.open_popup&&k(),"external_link"===n.open_popup&&!1===n.external_link_block&&v()}return p&&!0===n.formSubmit.enabled&&(p.addEventListener("wpcf7submit",b),p.addEventListener("wpformsAjaxSubmitSuccess",b)),document.addEventListener("click",(function(e){e.target.closest(".external-popup-continue")&&(e.preventDefault(),v())})),y(),h(),S(),void(!1!==n.hash_url.enable&&window.addEventListener("hashchange",(function(){h()})))};document.addEventListener("DOMContentLoaded",(function(){if("undefined"!=typeof PopupBoxObj)for(var e in PopupBoxObj){const t=document.getElementById(`ds-popup-${e}`),o=PopupBoxObj[e].selector,n=PopupBoxObj[e];new PopupBox(o,n,t)}}));

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.