GREGORY_ADS_JS

document.addEventListener(“DOMContentLoaded”, function() { console.log(‘Add ads’); console.log(window.ADS_MODEL); window.changeAdsSpot = async (htmltag, evttype, placeholder, oldspot, newspot) => { // update model window.ADS_MODEL[evttype]._showing[placeholder] = newspot; console.log(window.ADS_MODEL[evttype]._showing); // disable previous placeholder + delete ezstandalone.cmd.push(function() { ezstandalone.destroyPlaceholders(placeholder); }); await new Promise(resolve => setTimeout(resolve, 1000)); document.querySelector(`.spot-ads-${htmltag}-${oldspot}`).innerHTML…Continue reading

EDCC Checkboxes Utility

jQuery(‘input[value=”All US States”]’).click(function() { if (this.checked==true) { jQuery(‘fieldset.us_states > div > div > div > input’).prop( “checked”, true ); } else { jQuery(‘fieldset.us_states > div > div > div > input’).prop( “checked”, false ); } }); jQuery(‘input[value^=”Midwest”]’).click(function() { jQuery(‘input[value=”Illinois”],input[value=”Wisconsin”],input[value=”Indiana”],input[value=”North Dakota”],input[value=”South…Continue reading

Replace Special Characters in Post Title

var myInterval = setInterval(checkForJquery, 50); function checkForJquery() { if (window.jQuery) { clearInterval(myInterval); fixPageTitles(); } } function fixPageTitles() { /* find the page title */ var originalString = jQuery(‘h1.elementor-heading-title.elementor-size-default’).text(); /* replace raw special characters with the proper HTML entity */ if…Continue reading