Location: site_wide_footer
JavaScript: Real-Time Updates for MyCred Balance
document.addEventListener(“DOMContentLoaded”, () => { const logPrefix = “[MyCred]”; // Ensure MyCredData is defined if (typeof MyCredData === “undefined”) { console.error(`${logPrefix} MyCredData is not defined. Ensure it’s properly localized in PHP.`); return; } console.log(`${logPrefix} MyCredData initialized:`, MyCredData); let userCredits = MyCredData.points…Continue reading
Javascript: Glambot V2
document.addEventListener(“DOMContentLoaded”, () => { if (typeof MyCredData === “undefined”) { console.error(“[MyCred] MyCredData is not defined. Ensure it’s properly localized in PHP.”); return; } console.log(“[MyCred] MyCredData initialized:”, MyCredData); const chatCost = 1; // Fixed cost to unlock chat const timerKey =…Continue reading
Javascript: Prompt V3
document.addEventListener(‘DOMContentLoaded’, () => { console.log(“DOM fully loaded and parsed.”); // DOM Elements const formElement = document.querySelector(‘#wpforms-3650’); const creativeInput = document.querySelector(‘#wpforms-3650-field_1’); const promptBoosterInput = document.querySelector(‘#wpforms-3650-field_21’); if (!formElement || !creativeInput || !promptBoosterInput) { console.error(“Form or required fields not found!”); return; } console.log(“Form…Continue reading
“Lazy Load Images”.( For Dom Size)
document.addEventListener(“DOMContentLoaded”, function() { const lazyLoadImages = () => { const images = document.querySelectorAll(‘img.lazy’); const observer = new IntersectionObserver((entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { const img = entry.target; img.src = img.dataset.src; img.classList.remove(‘lazy’); observer.unobserve(img); } }); }); images.forEach(img…Continue reading
“Lazy Load Images”.
document.addEventListener(“DOMContentLoaded”, function() { const lazyLoadImages = () => { const images = document.querySelectorAll(‘img.lazy’); const observer = new IntersectionObserver((entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { const img = entry.target; img.src = img.dataset.src; img.classList.remove(‘lazy’); observer.unobserve(img); } }); }); images.forEach(img…Continue reading
HashBars and Responsive Menu Pro Adjustment
jQuery(document).ready(function($) { if($(‘.hthb-notification’).length){ var wpadminBar = 0; if($( “#wpadminbar” ).length){ wpadminBar = $( “#wpadminbar” ).height(); } setTimeout(() => { var hthbNotification = $( “.hthb-notification:visible” ).height(); $(‘body’).css(‘margin-top’,hthbNotification + ‘px’);hthbNotification $(‘#responsive-menu-pro-button’).css(‘margin-top’,hthbNotification + wpadminBar + 20 + ‘px’); $(window).resize(function(){ var hthbNotification = $(…Continue reading