console.log('Theme JS.ASP'); const helpJS = ` Help de Navegação ` const innerLoginContentJS = `
` const unidadesJS = ` Voltar para Unidades ` $(document).ajaxStop(function() { console.log("Todas as requisições AJAX terminaram."); if ($("#telaLogin").length > 0){ $('#s-login-b2b .s-login-b2b-container .s-login-b2b-card').after(helpJS); $('#s-login-b2b #botLoginEntrar').after(unidadesJS); $('#s-login-b2b #innerLoginContent').before(innerLoginContentJS); $('.btnSelectJS').on('click', function() { $('#innerLoginBtns').css('display', 'none'); $('#innerLoginContent').css('display', 'block'); history.replaceState({ navigated: true }, '', window.location.href); history.pushState({ navigated: true }, '', window.location.href); }); $(window).on('popstate', function() { window.location.reload(); }); } const alteraCategoria1 = "Apostilas"; const alteraCategoria2 = "Impressões"; const alteraCategoria3 = "Plastificações"; if ($('#breadcrumb').text().indexOf(alteraCategoria1) !== -1) { document.querySelector("#innerQuantidade > div > div.card-header > h3").innerHTML ='Selecione a Quantidade de Páginas Desejada'; document.querySelector("#innerQuantidadeCopias > div > div > div.card-header > h3").innerHTML ='Selecione a Quantidade de Apostilas Desejada'; } if ($('#breadcrumb').text().indexOf(alteraCategoria2) !== -1) { document.querySelector("#innerQuantidade > div > div.card-header > h3").innerHTML ='Selecione a Quantidade de Páginas Desejada'; document.querySelector("#innerQuantidadeCopias > div > div > div.card-header > h3").innerHTML ='Selecione a Quantidade de Jogos desejado'; } if ($('#breadcrumb').text().indexOf(alteraCategoria3) !== -1) { document.querySelector("#innerQuantidade > div > div.card-header > h3").innerHTML ='Selecione a Quantidade Desejada'; document.querySelector("#innerQuantidadeCopias > div > div > div.card-header > h3").innerHTML ='Selecione a Quantidade de Plastificações Desejada'; } $('body *').contents().filter(function() { return this.nodeType === 3 && /comprar/i.test(this.nodeValue); }).each(function() { this.nodeValue = this.nodeValue.replace(/comprar/gi, 'Solicitar'); }); $('input[type="button"], input[type="submit"]').each(function() { if (/comprar/i.test($(this).val())) { $(this).val($(this).val().replace(/comprar/gi, 'Solicitar')); } }); $(document).off("ajaxStop"); });