PageSourceSearch

https://caitlynlarsson.com/wp-content/plugins/popup-box/public/assets/js/jsPopup.min.js?ver=2.2.4

js caitlynlarsson.com collected 2026-09-26 21:00:54 UTC 6,068 bytes, 1 lines download raw bytes

1"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",auto_closePopup:!1,auto_closeDelay:"0",redirect_onClose:!1,redirect_URL:"",redirect_target:"_blank",cookie_enable:!1,cookie_name:"ds-popup-1",cookie_days:"30",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_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},t),i="ds-popup",c=o,s=c.querySelector(".ds-popup-wrapper"),l=c.querySelector(".ds-popup-content"),r=function(){if(!n.overlay_isVisible)return!1;let e=document.createElement("div");return e.className=i+"-overlay fadeIn",c.prepend(e),c.querySelector(".ds-popup-overlay")}(),p=function(){if(!n.close_isVisible)return!1;let e=document.createElement("div");return e.className=i+"-close",s.prepend(e),s.querySelector(".ds-popup-close")}(),u=function(){let e=c.querySelector('iframe[src*="youtube.com"]'),t=c.querySelector('iframe[src*="vimeo.com"]');return e||(t||!1)}();function a(e){let t="";for(let o in e)t+=o+":"+e[o]+";";return t}function d(){!function(){if(!r)return;r.style.cssText="z-index:"+(n.popup_zindex-3)+";"+a(n.overlay_css),r.setAttribute("data-ds-effect",n.overlay_animation)}(),function(){if(!l)return;l.style.cssText="z-index:"+(n.popup_zindex-1)+";"+a(n.content_css)}(),function(){if(!s)return;s.style.cssText="z-index:"+(n.popup_zindex-2)+";"+a(n.popup_css),s.classList.add(n.popup_position),s.setAttribute("data-ds-effect",n.popup_animation),window.screen.width<=parseInt(n.mobile_breakpoint)&&(s.style.cssText+=a(n.mobile_css));!function(){let e=getComputedStyle(s),t=e.height,o=e.width;if("auto"===t){s.style.display="block";let e=s.offsetHeight;s.style.display="",s.style.height=e+"px"}if("auto"===o){s.style.display="block";let e=s.offsetWidth;s.style.display="",s.style.width=e+"px"}switch(n.popup_position){case"-center":s.style.bottom="0",s.style.right="0";break;case"-bottomCenter":case"-topCenter":s.style.right="0"}}()}(),function(){if(!p)return;p.classList.add(n.close_position,n.close_type),p.style.cssText="z-index:"+n.popup_zindex+";"+a(n.close_css),p.setAttribute("data-ds-close-text",n.close_content),n.close_outer&&p.classList.add("-outer");if("-tag"===n.close_type||"-icon"===n.close_type){let e=p.style.fontSize,t=parseInt(e)+5,o={width:t+"px",height:t+"px","line-height":t+"px"};p.style.cssText+=a(o)}}()}function f(){switch(n.open_popup){case"click":!function(){let e=n.open_popupTrigger;document.querySelectorAll("."+e+', a[href$="'+e+'"]').forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),_()}))}))}();break;case"hover":!function(){let e=n.open_popupTrigger;document.querySelectorAll("."+e+', a[href$="'+e+'"]').forEach((e=>{e.addEventListener("mouseover",(e=>{e.preventDefault(),_()}))}))}();break;case"auto":setTimeout((function(){_()}),1e3*n.open_delay);break;case"scrolled":!function(){let e=!1;window.addEventListener("scroll",(function(t){let o=window.scrollY/(document.body.clientHeight-window.innerHeight);Math.round(100*o)>=n.open_distance&&(e||(_(),e=!0))}))}();break;case"rightclick":document.addEventListener("contextmenu",(function(e){return _(),!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&&_()}));break;case"exit":!function(){let e=!1;document.addEventListener("mouseleave",(function(t){t.clientY<0&&!e&&(_(),e=!0)}))}()}}function _(){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}
1(n.cookie_name)&&n.cookie_enable)){if(c.classList.add("ds-active"),r&&(r.style.display="block"),s.style.display="block",n.block_page){document.querySelectorAll("html, body").forEach((e=>{e.classList.add("no-scroll")}))}!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(){m()}),1e3*n.auto_closeDelay)}()}}function y(){!function(){let e=c.querySelector("."+n.close_popupTrigger);e&&e.addEventListener("click",(e=>{m()}))}(),function(){if(!n.popup_esc)return;window.addEventListener("keydown",(function(e){"Escape"!==e.key&&"Esc"!==e.key||m()}))}(),function(){if(!n.overlay_closesPopup||!r)return;r.addEventListener("click",(function(){m()}))}(),p&&p.addEventListener("click",(()=>{m()}))}function m(){!function(){if(!n.cookie_enable)return;const e=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))}(),c.classList.remove("ds-active"),function(){if(!n.video_enable||!n.video_autoPlay||!u)return;let e=u.getAttribute("src");e=e.split("?")[0],u.setAttribute("src",e+"?autoplay=0")}(),setTimeout((function(){r&&(r.style.display=""),s.style.display=""}),600),document.querySelectorAll("html, body").forEach((e=>{e.classList.remove("no-scroll")})),function(){if(!n.redirect_onClose)return;let e=n.redirect_URL;""!==e&&e.indexOf("http")>-1&&window.open(e,n.redirect_target)}()}return d(),f(),void y()};document.addEventListener("DOMContentLoaded",(function(){for(let e in window)if(e.indexOf("PopupBox_")>=0){let t=window[e];document.querySelectorAll(t.selector).forEach((e=>{new PopupBox(t.selector,t,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.