(function () {
function blockQeTextInstant() {
const styleId = 'qetext-kill-style';
if (!document.getElementById(styleId)) {
const style = document.createElement('style');
style.id = styleId;
style.innerHTML = `
#qetext{
display:none !important;
visibility:hidden !important;
opacity:0 !important;
pointer-events:none !important;
position:absolute !important;
left:-9999px !important;
top:-9999px !important;
z-index:-9999 !important;
}
`;
document.head.appendChild(style);
}
if (!window.qeObserver) {
window.qeObserver = new MutationObserver(() => {
const qe = document.querySelector('#qetext');
if (qe) {
qe.style.setProperty('display', 'none', 'important');
qe.style.visibility = "hidden";
qe.style.opacity = "0";
}
});
window.qeObserver.observe(document.body, {
childList: true,
subtree: true
});
}
}
function applyFix() {
if (!document.body.classList.contains('template-product')) return;
const container = document.querySelector('.buttons');
const target = document.querySelector('.product-main .product-details .single-product-meta');
if (!container || !target) return;
blockQeTextInstant();
const hide = container.querySelector('.hide_text');
const show = container.querySelector('.showtext');
if (hide) hide.remove();
if (show) show.remove();
if (target.nextElementSibling !== container) {
target.parentNode.insertBefore(container, target.nextSibling);
}
container.style.cssText = `
display:flex !important;
flex-direction:column !important;
align-items:flex-start !important;
gap:8px !important;
margin-top:12px !important;
padding:10px 14px !important;
background:#0a87da !important;
border-radius:6px !important;
width:fit-content !important;
`;
if (!container.querySelector('.audio-instruction')) {
const text = document.createElement('div');
text.className = "audio-instruction";
text.textContent = "Please click to listen to the audio of the description.";
text.style.cssText = `
color:#fff;
font-size:14px;
font-weight:500;
`;
container.prepend(text);
}
let btnWrapper = container.querySelector('.audio-btn-row');
if (!btnWrapper) {
btnWrapper = document.createElement('div');
btnWrapper.className = "audio-btn-row";
btnWrapper.style.cssText = `
display:flex;
align-items:center;
gap:10px;
`;
container.querySelectorAll('button').forEach(btn => {
btn.style.cssText = `
display:flex;
align-items:center;
justify-content:center;
background:transparent;
border:none;
cursor:pointer;
padding:5px;
color:#fff;
`;
btnWrapper.appendChild(btn);
});
container.appendChild(btnWrapper);
}
container.querySelectorAll('svg').forEach(svg => {
svg.style.width = "16px";
svg.style.height = "16px";
});
const close = container.querySelector('.close_sbutton');
if (close && !close.dataset.done) {
close.onclick = () => container.style.display = "none";
close.dataset.done = "1";
}
}
let count = 0;
const interval = setInterval(() => {
applyFix();
if (++count > 40) clearInterval(interval);
}, 250);
const observer = new MutationObserver(() => applyFix());
observer.observe(document.body, {
childList: true,
subtree: true
});
})();
.template-index #start_button,
.template-collection #start_button,
.template-product #start_button,
body.template-index .buttons {
display: none !important;
}
.template-collection .buttons,
.template-product .buttons {
display: none !important;
}