-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.min.js
More file actions
1 lines (1 loc) · 3.3 KB
/
script.min.js
File metadata and controls
1 lines (1 loc) · 3.3 KB
1
setTimeout(()=>{const s = document.createElement('script');s.src = "https://www.googletagmanager.com/gtag/js?id=G-9FWQFZME3Z";s.async = true;s.onload =()=>{window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','G-9FWQFZME3Z');};document.head.appendChild(s);},3000);const params = new URLSearchParams(window.location.search);const utmSource = params.get('utm_source');if(utmSource){console.log('UTM Source:',utmSource);document.cookie = `utm_source=${utmSource};path=/;max-age=2592000;SameSite=Lax`;}(function(w,d,e,u,f,l,n){w[f] = w[f] || function(){(w[f].q = w[f].q || []).push(arguments);};l = d.createElement(e);l.async = 1;l.src = u;n = d.getElementsByTagName(e)[0];n.parentNode.insertBefore(l,n);})(window,document,'script','https://assets.mailerlite.com/js/universal.js','ml');setTimeout(()=>{if(typeof ml=== "function"){ml('account','1922622');}},1000);function loadVideo(el){if(!el)return;el.innerHTML = `<iframe loading="lazy"src="https://www.youtube.com/embed/99FexhxsXx8?autoplay=1"allowfullscreen></iframe>`;}function showForm(token){const el = document.getElementById("form-container");if(el)el.style.display = "block";}window.addEventListener("load",()=>{const popup = document.getElementById('popup-ad');if(!popup)return;setTimeout(()=>{popup.style.display = 'block';},5000);});function ml_webform_success_33394663(){const $ = window.ml_jQuery || window.jQuery;if(!$)return;$('.ml-subscribe-form-33394663 .row-success').show();$('.ml-subscribe-form-33394663 .row-form').hide();}document.addEventListener("DOMContentLoaded",async()=>{const items = document.querySelectorAll(".last-updated");for(const el of items){const path = el.dataset.meta;if(!path)continue;try{const res = await fetch(path,{cache: "no-store"});if(!res.ok)throw new Error();const data = await res.json();const last = new Date(data.lastUpdated);const days = Math.floor((Date.now()- last)/(1000 * 60 * 60 * 24));const text =days=== 0 ? "Updated today" :days=== 1 ? "Updated yesterday" :`Updated ${days}days ago`;el.textContent = `🕒 ${text}`;}catch{el.textContent = "";}}});(function(){let typed = "";const secret = "HELLENICDEV";const message = document.getElementById("hidden-thanks");let triggered = false;document.addEventListener("keydown",(e)=>{if(triggered)return;if(e.key.length !== 1)return;typed += e.key.toUpperCase();typed = typed.slice(-secret.length);if(typed=== secret && message){message.style.display = "block";triggered = true;}});})();function showThankYou(){const msg = document.getElementById("hidden-thanks");if(msg)msg.style.display = "block";}const menuButton = document.getElementById("menuButton");const sideMenu = document.getElementById("sideMenu");if(menuButton && sideMenu){function toggleMenu(){const isOpen = sideMenu.style.left=== "0px";sideMenu.style.left = isOpen ? "-250px" : "0px";menuButton.setAttribute("aria-expanded",!isOpen);menuButton.classList.toggle("open",!isOpen);}menuButton.addEventListener("click",toggleMenu);menuButton.addEventListener("keydown",(e)=>{if(e.key=== "Enter" || e.key=== " "){e.preventDefault();toggleMenu();}});document.addEventListener("keydown",(e)=>{if(e.key=== "Escape" && sideMenu.style.left=== "0px"){toggleMenu();menuButton.focus();}});sideMenu.addEventListener("click",(e)=>{if(e.target.tagName=== "A" && sideMenu.style.left=== "0px"){toggleMenu();}});}