1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10jQuery(document).ready(function ($) { 11 var isSimpleBannerTextSet = simpleBannerScriptParams.simple_banner_text != ""; 12 var isDisabledByPagePath = simpleBannerScriptParams.simple_banner_disabled_page_paths ? simpleBannerScriptParams.simple_banner_disabled_page_paths.split(',') 13 .filter(Boolean) 14 .some(path => { 15 var pathname = path.trim(); 16 if (pathname.at(0) === '*' && pathname.at(-1) === '*') { 17 return window.location.pathname.includes(pathname.slice(1, -1)); 18 } 19 if (pathname.at(0) === '*') { 20 return window.location.pathname.endsWith(pathname.slice(1)); 21 } 22 if (pathname.at(-1) === '*') { 23 return window.location.pathname.startsWith(pathname.slice(0, -1)); 24 } 25 return window.location.pathname === pathname; 26 }) : false; 27 var isSimpleBannerEnabledOnPage = !simpleBannerScriptParams.pro_version_enabled || 28 (simpleBannerScriptParams.pro_version_enabled && !simpleBannerScriptParams.disabled_on_current_page && !isDisabledByPagePath); 29 var isSimpleBannerVisible = isSimpleBannerTextSet && isSimpleBannerEnabledOnPage; 30 31 if (isSimpleBannerVisible) { 32 if (!simpleBannerScriptParams.wp_body_open || !simpleBannerScriptParams.wp_body_open_enabled) { 33 var closeButton = simpleBannerScriptParams.close_button_enabled ? '<button aria-label="Close" id="simple-banner-close-button" class="simple-banner-button">✕</button>' : ''; 34 var prependElement = document.querySelector(simpleBannerScriptParams.simple_banner_insert_inside_element || simpleBannerScriptParams.simple_banner_prepend_element || 'body'); 35 $('<div id="simple-banner" class="simple-banner"><div class="simple-banner-text"><span>' 36 + simpleBannerScriptParams.simple_banner_text 37 + '</span></div>' + closeButton + '</div>') 38 .prependTo(prependElement || 'body'); 39 } 40 41 var bodyPaddingLeft = $('body').css('padding-left') 42 var bodyPaddingRight = $('body').css('padding-right') 43 44 if (bodyPaddingLeft != "0px") { 45 $('head').append('<style type="text/css" media="screen">.simple-banner{margin-left:-' + bodyPaddingLeft + ';padding-left:' + bodyPaddingLeft + ';}</style>'); 46 } 47 if (bodyPaddingRight != "0px") { 48 $('head').append('<style type="text/css" media="screen">.simple-banner{margin-right:-' + bodyPaddingRight + ';padding-right:' + bodyPaddingRight + ';}</style>'); 49 } 50 51 // Add scrolling class 52 function scrollClass() { 53 var scroll = document.documentElement.scrollTop; 54 if (scroll > $("#simple-banner").height()) { 55 $("#simple-banner").addClass("simple-banner-scrolling"); 56 } else { 57 $("#simple-banner").removeClass("simple-banner-scrolling"); 58 } 59 } 60 document.addEventListener("scroll", scrollClass); 61 } 62 63 // Add close button function to close button and close if cookie found 64 function closeBanner() { 65 if (!simpleBannerScriptParams.keep_site_custom_css && document.getElementById('simple-banner-site-custom-css')) document.getElementById('simple-banner-site-custom-css').remove(); 66 if (!simpleBannerScriptParams.keep_site_custom_js && document.getElementById('simple-banner-site-custom-js')) document.getElementById('simple-banner-site-custom-js').remove(); 67 if (document.getElementById('simple-banner-header-margin')) document.getElementById('simple-banner-header-margin').remove(); 68 if (document.getElementById('simple-banner-header-padding')) document.getElementById('simple-banner-header-padding').remove(); 69 if (document.getElementById('simple-banner')) document.getElementById('simple-banner').remove(); 70 } 71 72 if (isSimpleBannerVisible) { 73 var sbCookie = "simplebannerclosed"; 74
75 if (simpleBannerScriptParams.close_button_enabled){ 76 if (getCookie(sbCookie) === "true") { 77 closeBanner(); 78 // Set cookie again here in case the expiration has changed 79 setCookie(sbCookie, "true", simpleBannerScriptParams.close_button_expiration); 80 } else { 81 document.getElementById("simple-banner-close-button").onclick = function() { 82 closeBanner(); 83 setCookie(sbCookie, "true", simpleBannerScriptParams.close_button_expiration); 84 }; 85 } 86 } else { 87 // disable cookie if it exists 88 if (getCookie(sbCookie) === "true") { 89 document.cookie = "simplebannerclosed=true; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; 90 } 91 } 92 } 93 94 // Cookie Getter/Setter 95 function setCookie(cname,cvalue,expiration) { 96 var d; 97 if (expiration === '' || expiration === '0' || parseFloat(expiration)) { 98 var exdays = parseFloat(expiration) || 0; 99 d = new Date(); 100 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 101 } else { 102 d = new Date(expiration); 103 } 104 var expires = "expires=" + d.toUTCString(); 105 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 106 } 107 function getCookie(cname) { 108 var name = cname + "="; 109 var decodedCookie = decodeURIComponent(document.cookie); 110 var ca = decodedCookie.split(';'); 111 for(var i = 0; i < ca.length; i++) { 112 var c = ca[i]; 113 while (c.charAt(0) == ' ') { 114 c = c.substring(1); 115 } 116 if (c.indexOf(name) == 0) { 117 return c.substring(name.length, c.length); 118 } 119 } 120 return ""; 121 } 122 123 // Debug Mode 124 // Console log all variables 125 if (simpleBannerScriptParams.pro_version_enabled && simpleBannerScriptParams.debug_mode) { 126 console.log(simpleBannerScriptParams); 127 } 128}); 129 130}
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.