// ===========================
// Remover Powered by ereemby
// ==========================
document.addEventListener("DOMContentLoaded", function () {
const credit = document.querySelector('a[aria-label="Powered by Ereemby"]');
if (credit) credit.remove();
});
// =============================================
// BOA PLAY BANNER
// =============================================
function criarBannerBoaPlay(elemento) {
if (elemento.querySelector('.boaplay-hero')) {
return;
}
const bannerDiv = document.createElement('div');
bannerDiv.className = 'boaplay-hero';
bannerDiv.innerHTML = `
<div class="boaplay-hero-left">
<h1>VOLTZ PLAY</h1>
<p>Assista, ouça, divirta-se e pague muito menos!!</p>
<div class="boaplay-hero-image">
<a id="boaplay-banner-link" href="#" target="_self">
<img id="boaplay-banner-img" src="" alt="Banner BOA PLAY"
loading="lazy">
<div class="progress-bar-container">
<div class="progress-bar"></div>
</div>
<button class="quick-buy-btn">Comprar Agora ↓</button>
</a>
<button class="arrow left">❮</button>
<button class="arrow right">❯</button>
</div>
<div class="boaplay-buttons">
<button class="btn-blue" id="explorar-catalogo">
<span>Ver Catálogo ↓</span>
</button>
<button class="btn-dark" id="grupo-whatsapp">
<span class="whatsapp-icon"></span>
<span>Suporte Whatsapp</span>
</button>
</div>
</div>
<div class="mobile-banner-container">
<div class="mobile-banner-track" id="mobile-banner-track"></div>
</div>
<div class="mobile-banner-dots" id="mobile-banner-dots"></div> <!-- AGORA FORA DO
CONTAINER -->
`;
elemento.prepend(bannerDiv);
const banners = [
{
src: "https://cdn.ereemby.com/attachments/17550197354293763imagem.png",
link: "https://voltzplay.shop/product/17550197613986624831908544949"
},
{
src: "https://cdn.ereemby.com/attachments/17550473356662780imagem.png",
link: "https://voltzplay.shop/product/1738720779265090864576681612947"
},
{
src: "https://cdn.ereemby.com/attachments/17550473502616215imagem.png",
link: "https://voltzplay.shop/product/1738878146834177743838357364"
},
{
src: "https://cdn.ereemby.com/attachments/17550473209569328imagem.png",
link: "https://voltzplay.shop/product/174276728427788696454880951370889"
}
];
// Desktop Banner
let currentBanner = 0;
const bannerImg = document.getElementById('boaplay-banner-img');
const bannerLink = document.getElementById('boaplay-banner-link');
const progressBar = document.querySelector('.progress-bar');
const quickBuyBtn = document.querySelector('.quick-buy-btn');
const bannerDuration = 5000;
let startTime;
let animationId;
function updateBanner() {
bannerImg.src = banners[currentBanner].src;
bannerLink.href = banners[currentBanner].link;
quickBuyBtn.onclick = () => {
window.location.href = banners[currentBanner].link;
};
startTime = Date.now();
progressBar.style.width = '0%';
}
function animateProgress() {
const elapsed = Date.now() - startTime;
const progress = (elapsed / bannerDuration) * 100;
progressBar.style.width = progress + '%';
if (progress >= 100) {
currentBanner = (currentBanner + 1) % banners.length;
updateBanner();
}
animationId = requestAnimationFrame(animateProgress);
}
function startBanner() {
updateBanner();
startTime = Date.now();
animationId = requestAnimationFrame(animateProgress);
}
function pauseBanner() {
cancelAnimationFrame(animationId);
}
// Mobile Banner
const mobileTrack = document.getElementById('mobile-banner-track');
const mobileDots = document.getElementById('mobile-banner-dots');
let currentMobileSlide = 0;
let mobileInterval;
// Create mobile slides and dots
banners.forEach((banner, index) => {
// Create slide
const slide = document.createElement('div');
slide.className = 'mobile-banner-slide';
const slideLink = document.createElement('a');
slideLink.href = banner.link;
slideLink.innerHTML = `<img src="${banner.src}" alt="Banner ${index + 1}"
loading="lazy">`;
const mobileQuickBuy = document.createElement('button');
mobileQuickBuy.className = 'quick-buy-btn';
mobileQuickBuy.textContent = 'Comprar Agora ↓';
mobileQuickBuy.onclick = (e) => {
e.preventDefault();
window.location.href = banner.link;
};
slide.appendChild(slideLink);
slide.appendChild(mobileQuickBuy);
mobileTrack.appendChild(slide);
// Create dot
const dot = document.createElement('div');
dot.className = 'mobile-banner-dot';
if (index === 0) dot.classList.add('active');
dot.addEventListener('click', () => {
goToSlide(index);
});
mobileDots.appendChild(dot);
});
function goToSlide(index) {
currentMobileSlide = index;
mobileTrack.style.transform = `translateX(-${index * 100}%)`;
// Update active dot
document.querySelectorAll('.mobile-banner-dot').forEach((dot, i) => {
dot.classList.toggle('active', i === index);
});
}
function startMobileSlider() {
clearInterval(mobileInterval);
mobileInterval = setInterval(() => {
currentMobileSlide = (currentMobileSlide + 1) % banners.length;
goToSlide(currentMobileSlide);
}, bannerDuration);
}
// Initialize based on screen size
function initBanner() {
if (window.innerWidth > 768) {
startBanner();
clearInterval(mobileInterval);
} else {
startMobileSlider();
pauseBanner();
}
}
initBanner();
// Desktop events
const heroImage = document.querySelector('.boaplay-hero-image');
if (heroImage) {
heroImage.addEventListener('mouseenter', () => {
pauseBanner();
document.querySelector('.arrow.left').style.opacity = '1';
document.querySelector('.arrow.right').style.opacity = '1';
document.querySelector('.progress-bar-container').style.opacity = '1';
});
heroImage.addEventListener('mouseleave', () => {
startBanner();
document.querySelector('.arrow.left').style.opacity = '0';
document.querySelector('.arrow.right').style.opacity = '0';
document.querySelector('.progress-bar-container').style.opacity = '0';
});
document.querySelector('.arrow.left').addEventListener('click', (e) => {
e.stopPropagation();
currentBanner = (currentBanner - 1 + banners.length) % banners.length;
updateBanner();
});
document.querySelector('.arrow.right').addEventListener('click', (e) => {
e.stopPropagation();
currentBanner = (currentBanner + 1) % banners.length;
updateBanner();
});
}
// WhatsApp button
document.getElementById('grupo-whatsapp').addEventListener('click', () => {
window.open('https://whatsapp.com/channel/0029VbAZ6p2LNSa38CKpOt1A', '_blank');
});
// Catalog button
document.getElementById('explorar-catalogo').addEventListener('click', (e) => {
e.preventDefault();
const targetSection = document.querySelector('.BCXmP');
const offset = 100;
if (targetSection) {
const targetPosition = targetSection.getBoundingClientRect().top +
window.pageYOffset - offset;
window.scrollTo({
top: targetPosition,
behavior: 'smooth'
});
} else {
window.scrollTo({
top: document.body.scrollHeight,
behavior: 'smooth'
});
}
});
// Visibility observer
const visibilityObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
initBanner();
} else {
pauseBanner();
clearInterval(mobileInterval);
}
});
}, { threshold: 0.5 });
visibilityObserver.observe(bannerDiv);
// Resize handler
window.addEventListener('resize', initBanner);
}
// =============================================
// BOA PLAY BANNER INITIALIZATION
// =============================================
(function () {
const targetClass = 'sc-bce61202-0';
const targetClassAlt = 'eqzQsx';
const observer = new MutationObserver(() => {
const targetElement = document.querySelector('.' + targetClass + '.' +
targetClassAlt);
if (targetElement) {
criarBannerBoaPlay(targetElement);
}
});
observer.observe(document.body, {
childList: true,
subtree: true
});
document.addEventListener('DOMContentLoaded', () => {
const targetElement = document.querySelector('.' + targetClass + '.' +
targetClassAlt);
if (targetElement) {
criarBannerBoaPlay(targetElement);
}
});
})();
// =============================================
// PIX E CARTÃO
// =============================================
(function () {
"use strict";
function injectFontAwesome() {
if (!document.querySelector('link[href*="font-awesome"]')) {
const faLink = document.createElement('link');
faLink.rel = 'stylesheet';
faLink.href =
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css';
document.head.appendChild(faLink);
}
}
function updatePaymentInfo() {
const paragraphs = document.querySelectorAll('p.sc-284a1cfc-22');
paragraphs.forEach(p => {
if (p.textContent.includes("PIX") && !p.classList.contains("icons-added")) {
// Limpa conteúdo original
p.innerHTML = "";
// Ícone PIX
const pixIcon = document.createElement('i');
pixIcon.className = 'fa-brands fa-pix';
pixIcon.style.marginRight = '6px';
pixIcon.style.verticalAlign = 'middle';
pixIcon.style.fontSize = '1.1em';
pixIcon.style.color = '#32BCAD';
p.appendChild(pixIcon);
// Logo Mastercard
const mcIcon = document.createElement('img');
mcIcon.src = 'https://voltzplay.shop/imgs/payments/mastercard.svg';
mcIcon.alt = 'Mastercard';
mcIcon.style.marginRight = '6px';
mcIcon.style.verticalAlign = 'middle';
mcIcon.style.height = '1em';
p.appendChild(mcIcon);
// Texto atualizado
const spanText = document.createElement('span');
spanText.textContent = "À vista no PIX ou Cartão";
p.appendChild(spanText);
// Marca como já tratado
p.classList.add("icons-added");
}
});
}
injectFontAwesome();
// Observa mudanças no DOM (desktop e mobile)
const observer = new MutationObserver(updatePaymentInfo);
observer.observe(document.body, { childList: true, subtree: true });
// Executa inicialmente
updatePaymentInfo();
})();
/// REMOVER ICONE ///
(function () {
"use strict";
function removeIcons() {
// Seleciona todos os elementos com a classe correspondente
document.querySelectorAll(".sc-284a1cfc-27.dvSgdE").forEach(el => el.remove());
}
// Executa inicialmente
removeIcons();
// Observa mudanças no DOM para remover novos ícones carregados dinamicamente
const observer = new MutationObserver(removeIcons);
observer.observe(document.body, { childList: true, subtree: true });
})();
/// REMOVER ICONES 2 ///
(function () {
"use strict";
function removeAllIcons() {
// Remove todos os SVGs dentro dos cards de produto
document.querySelectorAll(".product_card svg").forEach(el => el.remove());
}
// Executa imediatamente
removeAllIcons();
// Observa mudanças no DOM (quando carregar mais produtos dinamicamente)
const observer = new MutationObserver(removeAllIcons);
observer.observe(document.body, { childList: true, subtree: true });
})();
// ============================
// 👇 REMOVER VER DETALHES POR COMPRAR AGORA 👇
// ============================
function substituirTextoBotoes() {
document.querySelectorAll('.product_card button').forEach(btn => {
if (btn.innerText.trim() === 'Ver Detalhes') {
btn.innerText = 'Comprar Agora';
console.log('🔄 Texto do botão alterado para "Comprar Agora"');
}
});
}
// Rodar quando a página carregar
document.addEventListener('DOMContentLoaded', substituirTextoBotoes);
// Observar mudanças no DOM (para quando React re-renderizar os cards)
const observer = new MutationObserver(() => {
substituirTextoBotoes();
});
observer.observe(document.body, { childList: true, subtree: true });