Primary Address Google Mutate

document.addEventListener(“DOMContentLoaded”, function () { const elements = document.querySelectorAll(‘.primary_address’); elements.forEach(function (el) { const address = el.textContent.trim(); if (address !== ”) { const mapsUrl = ‘https://www.google.com/maps/dir/?api=1&destination=’ + encodeURIComponent(address); el.innerHTML = ‘‘ + address + ‘‘; } }); });Continue reading

Tooltip Enhancement for Affiliate Text In Feature Single Page

// Author: Sumaiya, Clickup Doc: https://app.clickup.com/36636088/v/dc/12y1dr-22535/12y1dr-24455 // Wait for the DOM to fully load before executing the script document.addEventListener(‘DOMContentLoaded’, function() { // Select the tooltip container element const tooltipContainer = document.querySelector(‘.tooltip-container’); // Select the tooltip text element within the tooltip…Continue reading

Automatic HLE Table Handler

window.addEventListener(‘DOMContentLoaded’, () => { document.querySelectorAll(‘.hle’).forEach((table, index) => { // Check if the table needs expansion if (table.scrollHeight { table.classList.toggle(‘expanded’); btn.textContent = table.classList.contains(‘expanded’) ? ‘Show Less’ : ‘Show More’; }); // Insert the button after the current table table.insertAdjacentElement(‘afterend’, btn); });…Continue reading

Marquee Animation

const off = 10; let l = off; const marqueeElements = Array.from(document.querySelectorAll(‘.marquee span’)); const speed = 1.5; const stack = []; let pause = false; marqueeElements.forEach(element => { const width = element.offsetWidth + off; element.style.left = `${l}px`; l += width;…Continue reading

Collapsed Menu Reset for Mobile Menu

/** * WordPress admin menu handler – UiPress direct approach */ (function($) { // Execute when document is ready $(document).ready(function() { // Set up the mobile menu click handler setupMobileHandler(); // Also handle resize events $(window).on(‘resize’, debounce(function() { setupMobileHandler(); },…Continue reading

Mobile Menu Toggle JS

document.addEventListener(“DOMContentLoaded”, function() { const toggles = document.querySelectorAll(“.submenu-toggle”); toggles.forEach(function(toggle) { toggle.addEventListener(“click”, function(e) { const parent = e.target.closest(“li”); parent.classList.toggle(“open”); }); }); });Continue reading

Máscara CPF

// Carrega a biblioteca Inputmask var script = document.createElement(‘script’); script.src = “https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.8/jquery.inputmask.min.js”; script.onload = function () { aplicarMascaraCPF(); }; document.head.appendChild(script); // Função que aplica a máscara e a validação no campo CPF function aplicarMascaraCPF() { if (typeof jQuery === ‘undefined’…Continue reading

Admin Menu Separator Class

/** * WordPress Admin Menu Separator Class – Updated * * This script targets the specific structure of the admin menu separators * and adds the “bshSeparator” class to the parent container */ (function() { // Function to add classes…Continue reading