PageSourceSearch

https://retouchingacademy.com/wp-content/cache/min/1/wp-content/themes/basel-child/promo-bar.js?ver=1790101080

js retouchingacademy.com collected 2026-09-25 06:21:10 UTC 1,695 bytes, 15 lines download raw bytes

1(function(){'use strict';var EPOCH=Date.UTC(2026,7,16,0,0,0);var root=document.querySelector('[data-ra-tb]');if(!root){return}
2var slots=Array.prototype.slice.call(root.querySelectorAll('[data-ra-slot]'));if(!slots.length){return}
3var durations=slots.map(function(el){var h=parseFloat(el.getAttribute('data-hours'));return(isFinite(h)&&h>0?h:24)*3600000});var cycle=durations.reduce(function(a,b){return a+b},0);if(!cycle){return}
4function resolve(now){var pos=((now-EPOCH)%cycle+cycle)%cycle;for(var i=0;i<durations.length;i++){if(pos<durations[i]){return{index:i,remaining:durations[i]-pos}}
5pos-=durations[i]}
6return{index:0,remaining:durations[0]}}
7function pad(n){return n<10?'0'+n:String(n)}
8function format(ms){var s=Math.max(0,Math.floor(ms/1000));return'ENDS IN '+Math.floor(s/3600)+'h '+pad(Math.floor((s%3600)/60))+'m '+pad(s%60)+'s'}
9function measure(){document.documentElement.style.setProperty('--ra-tb-h',Math.round(root.getBoundingClientRect().height)+'px')}
10var live=-1;var counters=root.querySelectorAll('[data-ra-countdown]');var ticking=counters.length>0;var timer=null;function apply(){var state=resolve(Date.now());if(state.index!==live){for(var i=0;i<slots.length;i++){slots[i].classList.toggle('is-active',i===state.index)}
11live=state.index;root.setAttribute('data-ra-ready','');measure()}
12var cd=slots[live].querySelector('[data-ra-countdown]');if(cd){cd.textContent=format(state.remaining)}
13if(!ticking){clearTimeout(timer);timer=setTimeout(apply,Math.max(1000,state.remaining+250))}}
14apply();if(ticking){timer=setInterval(apply,1000)}
15window.addEventListener('resize',measure);document.addEventListener('visibilitychange',function(){if(!document.hidden){apply()}})})()

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.