1jQuery(document).ready( function() { 2 jQuery(".call_opendoorcheck").click(opendoorcheck); 3 jQuery(".call_opendoorcheck").trigger("click"); 4 5 jQuery(document).on('click','.call_persoblock_hide',persoblock_hide); 6 jQuery(document).on('click','.call_persoblock_show',persoblock_show); 7 jQuery(document).on('click','.call_realestatesearchcheck',realestatesearch_dismiss); 8 9 jQuery('#slidshow').show(); 10 11 setTimeout(function(){ 12 jQuery("#box-about").animate({ 13 top: "+=300px", 14 }, 4000 ); 15 16 setTimeout(function(){ 17 jQuery("#box-about").animate({ 18 top: "-=300px", 19 }, 1500 ); 20 }, 15000); 21 }, 3000); 22 23 jQuery(document).ready(function(){ 24 jQuery('[data-toggle="tooltip"]').tooltip(); 25 }); 26}); 27 28 29function detectAdblock() { 30 const adblockTests = { 31 // https://github.com/uBlockOrigin/uAssets/blob/master/filters/filters-2022.txt 32 uBlockOrigin: { 33 url: '/wp-content/themes/pikocon-child/src/adblocktest01.js', 34 id: '837jlaBksSjd9jh', 35 }, 36 // https://github.com/easylist/easylist/blob/master/easylist/easylist_general_block.txt 37 adblockPlus: { 38 url: '/wp-content/themes/pikocon-child/src/adblocktest02.js', 39 id: 'hfuBadsf3hFAk', 40 }, 41 }; 42 43 function canLoadRemoteScript(obj) { 44 return new Promise(function (resolve, reject) { 45 var script = document.createElement('script'); 46 47 script.onload = function () { 48 if (document.getElementById(obj.id)) { 49 resolve(false); 50 } else { 51 resolve(true); 52 } 53 } 54 55 script.onerror = function () { 56 resolve(true); 57 } 58 59 script.src = obj.url; 60 document.body.appendChild(script); 61 }); 62 } 63 64 return new Promise(function (resolve, reject) { 65 let promises = [ 66 canLoadRemoteScript(adblockTests.uBlockOrigin), 67 canLoadRemoteScript(adblockTests.adblockPlus), 68 ]; 69 70 Promise.all(promises).then((results) => { 71 resolve({ 72 uBlockOrigin: results[0], 73 adblockPlus: results[1], 74 usingAdblock: (results[0] === true) || (results[1] === true), 75 }); 76 }).catch((err) => { 77 reject(err); 78 }); 79 }); 80} 81 82 83 84function opendoorcheck(e){ 85 e.preventDefault(); 86 87 nonce = jQuery(this).attr("data-nonce"); 88 pid = jQuery(this).attr("data-pid"); 89 adminloggedin = jQuery(this).attr("data-adminloggedin");
90 pagePath = (typeof window !== 'undefined' && window.location && window.location.pathname) ? window.location.pathname : ''; 91 92 jQuery.ajax({ 93 type : "post", 94 dataType : "json", 95 url : myAjax.ajaxurl, 96 data : {action: "opendoorcheck", nonce: nonce, pid: pid, adminloggedin: adminloggedin, pagePath: pagePath}, 97 success: function(response) { 98 99 if (response.isopendoor) { 100 jQuery("#wp_login_custom").show(); 101 } 102 103 if (response.languageblock) { 104 jQuery("#wp_languagedetect").html(response.languageblock).show(); 105 } 106 107 if (response.pageblockedtemplate == "1") { 108 // too many pageviews - redirect to community 109 window.location = "/community/?from=pageblocked"; 110 } 111 112 if (response.persoblock) { 113 // perso block was passed -- should always happen 114 115 // place html code properly 116 jQuery("#persoblock").html(response.persoblock); 117 118 if (response.showpersoblock) { 119 // show perso block -- user has not yet agreed 120 setTimeout(function(){ 121 jQuery("#persoblock").animate({bottom:"-=-325px"},500); 122 }, 1500); 123 } else { 124 // hide perso block and show the perso block badge 125 setTimeout(function(){ 126 jQuery("#persoblock-badge").show(); 127 }, 500); 128 } 129 } 130 131 var suppressRealEstateSearchOverlay = false; 132 if (typeof myAjax !== 'undefined' && myAjax.realEstateOverlayExcludedPaths && Array.isArray(myAjax.realEstateOverlayExcludedPaths)) { 133 var currentPath = (typeof window !== 'undefined' && window.location && window.location.pathname) ? window.location.pathname : ''; 134 if (currentPath && currentPath[0] !== '/') { 135 currentPath = '/' + currentPath; 136 } 137 if (currentPath && currentPath.slice(-1) !== '/') { 138 currentPath = currentPath + '/'; 139 } 140 for (var i = 0; i < myAjax.realEstateOverlayExcludedPaths.length; i++) { 141 var excludedPath = myAjax.realEstateOverlayExcludedPaths[i]; 142 if (!excludedPath || typeof excludedPath !== 'string') { 143 continue; 144 } 145 if (excludedPath[0] !== '/') { 146 excludedPath = '/' + excludedPath; 147 } 148 if (excludedPath.slice(-1) !== '/') { 149 excludedPath = excludedPath + '/'; 150 } 151 if (excludedPath === currentPath) { 152 suppressRealEstateSearchOverlay = true; 153 break; 154 } 155 } 156 } 157 158 if (response.showrealestatesearch && !suppressRealEstateSearchOverlay) { 159 // show static footer -- user has not yet agreed 160 setTimeout(function(){ 161 // show premium partners and cookie notification 162 jQuery('#realestatesearch').animate({right:"-=-550px"},500); 163 }, 1500); 164 } 165 166 if (response.showmobilenote && jQuery(window).width() <= 500) { 167 // show to mobile users 168 jQuery('#mobilenote').show(); 169 } 170 171 if (response.showexitintent) { 172 // if you want to use the 'fire' or 'disable' fn, 173 // you need to save OuiBounce to an object 174 var _ouibounce = ouibounce(document.getElementById('ouibounce-modal'), { 175 aggressive: true, 176 timer: 0, 177 callback: function() { 178 // console.log('ouibounce fired!'); 179 180 jQuery('.modal').each(function() { 181 var isParentOuibounceModal = jQuery(this).parent().attr('id') === 'ouibounce-modal'; 182 183 if (isParentOuibounceModal) { 184 jQuery(this).show(); 185 } 186 }); 187 188 jQuery('#staticfooter').remove(); 189 jQuery('.bugme').remove(); 190 191 jQuery('#exit-modal-email').focus(); 192 } 193 }); 194 195 jQuery('body').on('click', function() { 196 jQuery('#ouibounce-modal').hide(); 197 }); 198 199 jQuery('#ouibounce-modal .modal-decline').on('click', function() { 200 exitintent_dismiss(); 201 jQuery('#ouibounce-modal').hide(); 202 }); 203 204 jQuery('#ouibounce-modal .modal').on('click', function(e) { 205 e.stopPropagation(); 206 }); 207 } 208 209 } 210 }) 211} 212 213function persoblock_hide(e){ 214 e.preventDefault(); 215 216 jQuery('#persoblock-badge').show(); 217 jQuery('#persoblock').animate({bottom:"-=325px"},500); 218 219 nonce = jQuery(this).attr("data-nonce"); 220 221 jQuery.ajax({ 222 type : "post", 223 dataType : "json", 224 url : myAjax.ajaxurl, 225 data : {action: "staticfooter_dismiss", nonce: nonce}, 226 success: function(response) { 227 // finished 228 } 229 }) 230} 231 232function persoblock_show(e){
233 e.preventDefault(); 234 235 jQuery('#persoblock').animate({bottom:"+=325px"},500); 236 jQuery('#persoblock-badge').hide(); 237 238 nonce = jQuery(this).attr("data-nonce"); 239 240 jQuery.ajax({ 241 type : "post", 242 dataType : "json", 243 url : myAjax.ajaxurl, 244 data : {action: "staticfooter_dismiss", nonce: nonce}, 245 success: function(response) { 246 // finished 247 } 248 }) 249} 250 251 252function realestatesearch_dismiss(e){ 253 e.preventDefault(); 254 255 jQuery('#realestatesearch').animate({right:"-=550px"},500); 256 257 nonce = jQuery(this).attr("data-nonce"); 258 259 jQuery.ajax({ 260 type : "post", 261 dataType : "json", 262 url : myAjax.ajaxurl, 263 data : {action: "realestatesearch_dismiss", nonce: nonce}, 264 success: function(response) { 265 // finished 266 } 267 }) 268} 269 270 271function exitintent_dismiss(){ 272 nonce = jQuery(this).attr("data-nonce"); 273 274 jQuery.ajax({ 275 type : "post", 276 dataType : "json", 277 url : myAjax.ajaxurl, 278 data : {action: "exitintent_dismiss", nonce: nonce}, 279 success: function(response) { 280 // finished 281 console.log('exit intent dismissed'); 282 } 283 }) 284} 285 286
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.