1(function () { 2 var w = (window.innerWidth || document.documentElement.clientWidth); 3 var isMobile = w <= 600; 4 5 var containerStyle = isMobile 6 ? "max-width:1000px;margin:0 auto 14px auto;display:flex;align-items:center;background:linear-gradient(135deg,#7a0b0b,#b31212);color:#ffffff;border-radius:14px;font-family:Segoe UI,Roboto,Arial,sans-serif;overflow:hidden;box-shadow:0 8px 18px rgba(0,0,0,0.32);" 7 : "max-width:1000px;margin:0 auto 20px auto;display:flex;align-items:center;background:linear-gradient(135deg,#7a0b0b,#b31212);color:#ffffff;border-radius:14px;font-family:Segoe UI,Roboto,Arial,sans-serif;overflow:hidden;box-shadow:0 8px 20px rgba(0,0,0,0.35);"; 8 9 var photoWrapStyle = isMobile 10 ? "width:78px;display:flex;align-items:center;justify-content:center;" 11 : "display:flex;align-items:center;justify-content:center;"; 12 13 var imgStyle = isMobile 14 ? "height:52px;width:auto;display:block;" 15 : "height:60px;width:auto;display:block;"; 16 17 var textStyle = isMobile 18 ? "padding:12px 14px;font-size:0.98rem;line-height:1.2;font-weight:700;text-align:left;flex:1;" 19 : "padding:18px 24px;font-size:1.15rem;line-height:1.4;font-weight:700;text-align:left;flex:1;"; 20 21 var html = 22 '<div style="' + containerStyle + '">' + 23 '<div style="' + photoWrapStyle + '">' + 24 '<img src="/banners/ico-mr.png" alt="Marcos Rocha" style="' + imgStyle + '">' + 25 '</div>' + 26 '<div id="texto-contador-marcos-rocha" style="' + textStyle + '">Carregando contagem regressiva...</div>' + 27 '</div>'; 28 29 document.write(html); 30 31 // ===== CONTADOR ===== 32 var endDate = new Date(2027, 0, 6); 33 var el = document.getElementById("texto-contador-marcos-rocha"); 34 35 function plural(n, s, p) { 36 return n === 1 ? s : p; 37 } 38 39 function diffMonthsCalendar(from, to) { 40 var months = 41 (to.getFullYear() - from.getFullYear()) * 12 + 42 (to.getMonth() - from.getMonth()); 43 44 var test = new Date(from); 45 test.setMonth(test.getMonth() + months); 46 47 if (test > to) months--; 48 return Math.max(0, months); 49 } 50 51 function addMonths(date, months) { 52 var d = new Date(date); 53 var day = d.getDate(); 54 d.setMonth(d.getMonth() + months); 55 if (d.getDate() < day) d.setDate(0); 56 return d; 57 } 58 59 function render() { 60 var now = new Date(); 61 62 if (now >= endDate) { 63 el.textContent = "O Governo Marcos Rocha já terminou"; 64 return; 65 } 66 67 var months = diffMonthsCalendar(now, endDate); 68 var afterMonths = addMonths(now, months); 69 var oneDay = 1000 * 60 * 60 * 24; 70 var days = Math.floor((endDate - afterMonths) / oneDay); 71 72 el.textContent = 73 "Faltam " + months + " " + plural(months,"mês","meses") + 74 " e " + days + " " + plural(days,"dia","dias") + 75 " para o fim do governo Marcos Rocha"; 76 } 77 78 render(); 79 setInterval(render, 60 * 60 * 1000); 80})();
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.