1(function(){console.log("[H-TITLE] Script init");const isPDP=document.body.classList.contains("template-product");if(console.log("[H-TITLE] is PDP:",isPDP),!isPDP)return;function upgradeTitles(root=document){const titles=root.querySelectorAll(".product-item__product-title");console.log("[H-TITLE] Titles found:",titles.length),titles.forEach((title,index)=>{const tag=title.tagName.toLowerCase();if(tag==="h3")return;console.log(`[H-TITLE] Upgrading title #${index+1} from ${tag} to h3`);const h3=document.createElement("h3");[...title.attributes].forEach(attr=>{h3.setAttribute(attr.name,attr.value)}),h3.innerHTML=title.innerHTML,title.replaceWith(h3)})}upgradeTitles(),new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.addedNodes.forEach(node=>{node instanceof HTMLElement&&(node.matches?.(".product-item__product-title")||node.querySelector?.(".product-item__product-title"))&&(console.log("[H-TITLE] Detected dynamic content"),upgradeTitles(node))})})}).observe(document.body,{childList:!0,subtree:!0}),console.log("[H-TITLE] MutationObserver active")})(),(function(){const SELECTOR=".ProductVariant--DiscountValue";function formatDiscountText(text){const match=String(text).trim().match(/^(-?\d+(?:\.\d+)?)\s*%$/);if(!match)return null;const raw=match[1];if(!raw.includes("."))return null;const rounded=Math.round(Number(raw));return Number.isFinite(rounded)?`${rounded}%`:null}function fixDiscountBadges(root=document){const candidates=[];root instanceof HTMLElement&&root.matches?.(SELECTOR)&&candidates.push(root),root.querySelectorAll&&root.querySelectorAll(SELECTOR).forEach(el=>candidates.push(el)),candidates.forEach(el=>{const next=formatDiscountText(el.textContent);next&&el.textContent.trim()!==next&&(el.textContent=next)})}function init(){fixDiscountBadges(),new MutationObserver(mutations=>{for(const mutation of mutations)if(mutation.type==="childList"&&mutation.addedNodes.forEach(node=>{node instanceof HTMLElement&&(node.matches?.(SELECTOR)||node.querySelector?.(SELECTOR)||node.matches?.(".MainTabarnappUIContainer")||node.querySelector?.(".MainTabarnappUIContainer"))&&fixDiscountBadges(node)}),mutation.type==="characterData"){const parent=mutation.target.parentElement;parent?.matches?.(SELECTOR)&&fixDiscountBadges(parent)}}).observe(document.body,{childList:!0,subtree:!0,characterData:!0})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})(),(function(){const ROOT_SELECTOR=".MainTabarnappUIContainer",CHEVRON_SELECTOR=".chevron-minimize";let done=!1,observer=null;function tryCollapse(){if(done)return;const root=document.querySelector(ROOT_SELECTOR);if(!root)return;const expanded=root.querySelector('.BottomBar-quest-container-expanded-completedQuests, [class*="BottomBar-quest-container-expanded"], .BottomBarExpandedTabs'),chevron=root.querySelector(CHEVRON_SELECTOR);!expanded||!chevron||(done=!0,observer&&observer.disconnect(),chevron.click())}function init(){tryCollapse(),observer=new MutationObserver(()=>{tryCollapse()}),observer.observe(document.body,{childList:!0,subtree:!0}),window.setTimeout(()=>{done=!0,observer&&observer.disconnect()},2500)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})(); 2//# sourceMappingURL=/cdn/shop/t/55/assets/custom.js.map?v=174706816206453013661788281753
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.