Untitled Snippet

document.addEventListener(“click”, (e) => { const pill = e.target.closest(“.rs-pill”); if (!pill) return; const row = pill.parentElement; row.querySelectorAll(“.rs-pill”).forEach(p => p.classList.remove(“active”)); pill.classList.add(“active”); });Continue reading

Fit Men Academy Footer

Fit Men Academy / Here’s an improved prompt that addresses your concerns and provides clear instructions for implementation: — **Prompt:** “I have the free version of WPCode Lite installed on my WordPress Kadence theme. I need your help creating a…Continue reading

SurveyVista – Script to Control Modal

window.addEventListener(“load”, () => { const iFrame = document.getElementById(“surveyFrame”); // Load survey in background AFTER page load if (iFrame && iFrame.dataset.src) { iFrame.src = iFrame.dataset.src; } // Show modal after 12 seconds setTimeout(() => { // Show the modal const modal…Continue reading

Glossary sorting

(function () { if (window.__glossaryAZSorterInstalled) return; window.__glossaryAZSorterInstalled = true; function isGlossaryPage() { return !!( document.querySelector(“nav.nav-az”) && document.querySelector(“section.letter#A”) && document.querySelector(“article.glossary-entry h2”) ); } function getTitle(article) { var h2 = article.querySelector(“h2”); return (h2 ? h2.textContent : “”).trim(); } function getCollator() { var…Continue reading

Wide – Convert to GR – JavaScript (Frontend – Real-time)

(function($) { ‘use strict’; // Ελληνικοί τόνοι -> χωρίς τόνους const accentMap = { ‘ά’: ‘α’, ‘έ’: ‘ε’, ‘ή’: ‘η’, ‘ί’: ‘ι’, ‘ό’: ‘ο’, ‘ύ’: ‘υ’, ‘ώ’: ‘ω’, ‘Ά’: ‘Α’, ‘Έ’: ‘Ε’, ‘Ή’: ‘Η’, ‘Ί’: ‘Ι’, ‘Ό’: ‘Ο’, ‘Ύ’: ‘Υ’,…Continue reading

Smash Ballon Content “load more” Link entfernen

jQuery(document).ready(function ($) { function unwrapSbiExpandLinks(context) { $(context).find(‘.sbi_expand > a’).each(function () { // entfernen, Inhalt behalten (z.B. …) $(this).replaceWith($(this).contents()); }); } // 1) initial unwrapSbiExpandLinks(document); // 2) nach Klick auf “Mehr laden” (zusätzliche Absicherung) $(document).on(‘click’, ‘#sbi_load .sbi_load_btn, .sbi_load_btn’, function () {…Continue reading

Smash Balloon Bild-Links Tabindex

jQuery(document).ready(function ($) { const observer = new MutationObserver(function () { $(‘.sbi_photo’).attr(‘tabindex’, ‘0’); }); observer.observe(document.body, { childList: true, subtree: true }); });Continue reading

使用.number 加入數字跳動動態

document.addEventListener(“DOMContentLoaded”, function () { const counters = document.querySelectorAll(“.number”); const animateCounter = (counter) => { // 避免重複執行 if (counter.dataset.animated) return; counter.dataset.animated = “true”; // 取出 + const sup = counter.querySelector(“sup”); const supHTML = sup ? sup.outerHTML : “”; // 取純數字(忽略 sup)…Continue reading

Untitled Snippet

function getChatContent() { const chat = document.querySelector(‘.mwai-chatbot .mwai-messages’) || document.querySelector(‘.mwai-chatbot’); return chat ? chat.innerHTML : ”; } function getChatText() { const chat = document.querySelector(‘.mwai-chatbot .mwai-messages’) || document.querySelector(‘.mwai-chatbot’); return chat ? chat.innerText : ”; } function buildPDFHtml(content) { return ` Your…Continue reading