(function () { var SVG = ''; var BRAND = 'Zektyc'; var SUN = ''; var MOON = ''; var THEME_BTN = ''; function path() { return location.pathname; } function lang() { return /^\/en(\/|$)/.test(path()) ? 'en' : 'fr'; } function isHome() { var p = path(); return p === '/' || p === '/index.html' || p === '/en/' || p === '/en/index.html'; } function isFpTest() { return /\/fingerprint-test/.test(path()); } function isSocial() { return /\/social/.test(path()); } function frLink() { var p = path(); if (p === '/en/') return '/'; var m = p.match(/^(\/[^/]+)\/en\/?$/); if (m) return m[1] + '/'; return p; } function enLink() { var p = path(); if (p === '/' || p === '/index.html') return '/en/'; if (/\/en\/?$/.test(p)) return p; return p.replace(/\/?$/, '/en/'); } function buildHeader() { var h = lang(); var skip = h === 'fr' ? 'Aller au contenu' : 'Skip to content'; var html = ''; html += '' + BRAND + ''; html += ''; html += ''; if (isSocial()) { html += ''; } else { html += ''; } return ''; } function buildFooter() { var h = lang(); var tos = h === 'fr' ? "Conditions d\u2019utilisation" : 'Terms of Service'; var priv = h === 'fr' ? 'Confidentialit\u00e9' : 'Privacy'; var note = h === 'fr' ? 'Ce site ne collecte rien. Aucun cookie, aucun tracker.' : 'This site collects nothing. No cookies, no trackers.'; var tosHref = h === 'fr' ? '/tos' : '/en/tos'; var privHref = h === 'fr' ? '/privacy-policy' : '/en/privacy-policy'; var html = ''; if (isSocial()) { var backText = h === 'fr' ? 'Retour au site' : 'Back to site'; html += '

' + backText + ' \u2190

'; } html += '

Zektyc \u00b7 France

'; html += ''; html += ''; return ''; } function inject() { var hs = document.getElementById('h'); var fs = document.getElementById('f'); if (hs) hs.outerHTML = buildHeader(); if (fs) fs.outerHTML = buildFooter(); var nav = document.getElementById('nav-toggle'); if (nav) { document.addEventListener('click', function (e) { if (e.target.closest && e.target.closest('.site-nav')) nav.checked = false; }); } } function isTorBrowser() { var dbg = { hostname: location.hostname, userAgent: navigator.userAgent, hasTorSensor: !!window.TorSensor, uaMatch: /TorBrowser|Tor\/|Tor Project/i.test(navigator.userAgent), timezoneOffset: new Date().getTimezoneOffset(), gmt: (new Date().getTimezoneOffset() === 0), screenW: window.screen && window.screen.width, screenH: window.screen && window.screen.height, innerW: window.innerWidth, innerH: window.innerHeight, letterboxed: !!(window.screen && window.screen.width === window.innerWidth && window.screen.height === window.innerHeight), pluginCount: (navigator.plugins && navigator.plugins.length) || 0, noPlugins: !navigator.plugins || navigator.plugins.length === 0, vendor: navigator.vendor }; if (isOnion()) { dbg.result = 'onion:' + location.hostname; console.log('[TorToast] on .onion, skip', dbg); return true; } if (dbg.hasTorSensor) { dbg.result = 'TorSensor'; console.log('[TorToast] detected via TorSensor', dbg); return true; } if (dbg.uaMatch) { dbg.result = 'userAgent'; console.log('[TorToast] detected via userAgent', dbg); return true; } if (dbg.gmt && dbg.letterboxed) { dbg.result = 'gmt+letterbox'; console.log('[TorToast] detected via gmt+letterbox', dbg); return true; } if (dbg.gmt && dbg.letterboxed && dbg.noPlugins) { dbg.result = 'gmt+letterbox+noPlugins'; console.log('[TorToast] detected via gmt+letterbox+noPlugins', dbg); return true; } if (dbg.vendor === '' && dbg.gmt && dbg.noPlugins) { dbg.result = 'vendorEmpty+gmt+noPlugins'; console.log('[TorToast] detected via vendorEmpty+gmt+noPlugins', dbg); return true; } if (dbg.gmt && dbg.letterboxed && dbg.vendor === '') { dbg.result = 'gmt+letterbox+vendorEmpty'; console.log('[TorToast] detected via gmt+letterbox+vendorEmpty', dbg); return true; } dbg.result = 'NOT tor'; console.log('[TorToast] not detected as Tor', dbg); return false; } function isOnion() { return location.hostname.indexOf('.onion') !== -1; } function showTorToast() { if (!isTorBrowser() || isOnion()) return; var onionBase = 'http://l5cbkqmok4rnkhbtpltmtlf3pa5i5rfw23z2mtj5tugpo3quta3b5hqd.onion'; var path = location.pathname + location.search + location.hash; var onionUrl = onionBase + path; var toast = document.createElement('div'); toast.className = 'tor-toast'; toast.setAttribute('role', 'alert'); var h = lang(); var msg = h === 'fr' ? 'Vous utilisez Tor. Acc\u00e9dez \u00e0 la version .onion pour plus de s\u00e9curit\u00e9.' : 'You are using Tor. Access the .onion version for better security.'; toast.innerHTML = '

' + msg + '

' + '' + (h === 'fr' ? 'Ouvrir en .onion' : 'Open .onion') + '' + ''; document.body.appendChild(toast); toast.querySelector('.tor-toast-close').addEventListener('click', function () { toast.remove(); }); setTimeout(function () { toast.remove(); }, 30000); } function boot() { inject(); showTorToast(); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', boot); } else { boot(); } })();