PageSourceSearch

https://olhardigital.com.br/scripts.js?s=trial-cta&v=5.2

js olhardigital.com.br collected 2026-10-01 07:51:01 UTC 4,162 bytes, 16 lines download raw bytes

1(function(){'use strict';const CHECKOUT_URL='/assinantes/store-subscribe.php?buy=prime-subscription';const NUDGE_KEY='sn_trial_nudge_shown_at';const NUDGE_INTERVAL=60*60*1000;const MODAL_DELAY_MS=5000;function isTrial(){return!!(window.SIGN&&SIGN.user&&SIGN.user.subscription_level===100);}
2function isHome(){return window.location.pathname==='/';}
3function activate(){if(!isTrial())return;renderInlineBox();if(!isHome())maybeShowModal();}
4if(window.SIGN&&typeof SIGN.addLoggedInCallback==='function'){SIGN.addLoggedInCallback(activate);}
5function renderInlineBox(){const article=document.querySelector('.sng-cnt');if(!article)return;if(article.querySelector('.sn-trial-inline'))return;const firstP=article.querySelector(':scope > p');if(!firstP)return;const box=document.createElement('aside');box.className='sn-trial-inline';box.innerHTML='<div class="sn-trial-inline-body">'+'<span class="sn-trial-inline-eyebrow">'+starIcon()+'CLUBE OLHAR DIGITAL</span>'+'<h3 class="sn-trial-inline-title">Como está sua experiência?</h3>'+'<p class="sn-trial-inline-sub">Assine agora e garanta navegação sem publicidade, acesso a conteúdos exclusivos, jogos, descontos especiais em cursos e muito mais!</p>'+'</div>'+'<a href="'+CHECKOUT_URL+'" class="sn-trial-inline-btn">ASSINE JÁ '+arrowIcon()+'</a>';firstP.after(box);}
6let showTimer=null;function scheduleShow(delayMs){if(showTimer)clearTimeout(showTimer);showTimer=setTimeout(showModal,Math.max(0,delayMs));}
7function maybeShowModal(){let delay=MODAL_DELAY_MS;try{const last=parseInt(localStorage.getItem(NUDGE_KEY)||'0',10);if(last){const remaining=NUDGE_INTERVAL-(Date.now()-last);if(remaining>0)delay=remaining;}}catch(e){}
8scheduleShow(delay);}
9function showModal(){showTimer=null;if(document.querySelector('.sn-trial-nudge'))return;try{const last=parseInt(localStorage.getItem(NUDGE_KEY)||'0',10);if(last){const remaining=NUDGE_INTERVAL-(Date.now()-last);if(remaining>0){scheduleShow(remaining);return;}}
10localStorage.setItem(NUDGE_KEY,String(Date.now()));}catch(e){}
11const modal=document.createElement('div');modal.className='sn-trial-nudge';modal.innerHTML='<div class="sn-trial-nudge-backdrop"></div>'+'<div class="sn-trial-nudge-content" role="dialog" aria-modal="true" aria-labelledby="sn-trial-nudge-title">'+'<button type="button" class="sn-trial-nudge-close" data-nudge-close aria-label="Fechar">'+closeIcon()+'</button>'+'<span class="sn-trial-nudge-eyebrow">'+starIcon()+'CLUBE OLHAR DIGITAL</span>'+'<h3 id="sn-trial-nudge-title" class="sn-trial-nudge-title">Como está sua experiência?</h3>'+'<p class="sn-trial-nudge-sub">Assine agora e garanta navegação sem publicidade, acesso a conteúdos exclusivos, jogos, descontos especiais em cursos e muito mais!</p>'+'<a href="'+CHECKOUT_URL+'" class="sn-trial-nudge-btn">ASSINE JÁ '+arrowIcon()+'</a>'+'<button type="button" class="sn-trial-nudge-later" data-nudge-close>Continuar lendo</button>'+'</div>';document.body.appendChild(modal);document.body.style.overflow='hidden';modal.addEventListener('click',function(e){if(e.target.closest('[data-nudge-close]'))closeModal();});document.addEventListener('keydown',onEscape);}
12function onEscape(e){if(e.key==='Escape')closeModal();}
13function closeModal(){const modal=document.querySelector('.sn-trial-nudge');if(modal)modal.remove();document.body.style.overflow='';document.removeEventListener('keydown',onEscape);scheduleShow(NUDGE_INTERVAL);}
14function starIcon(){return'<svg viewBox="0 0 24 24" width="15" height="15" fill="currentColor" aria-hidden="true"><path d="M12 2 L14.09 8.26 L20.6 8.27 L15.36 12.14 L17.44 18.4 L12 14.54 L6.56 18.4 L8.64 12.14 L3.4 8.27 L9.91 8.26 Z"/></svg>';}
15function arrowIcon(){return'<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>';}
16function closeIcon(){return'<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>';}})();

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.