Hráského 2231/25, 148 00 Praha 11

Webová stránka v rekonstrukci

SHADRON

Řešíme 
Bílou a šedou reklamu
Odpovědného zástupce pro vázanou činnost
Virtuální sídla
Založení s.r.o./OSVČ
Účetnictví
script> (function(){ const btn = document.querySelector('.btn-runaway'); if (!btn) return; const SAFE_DISTANCE = 100; // vzdálenost px, kdy začne uhýbat const MOVE_STEP = 120; // o kolik px se posune window.addEventListener('mousemove', (e) => { const rect = btn.getBoundingClientRect(); const mouseX = e.clientX; const mouseY = e.clientY; const btnCenterX = rect.left + rect.width / 2; const btnCenterY = rect.top + rect.height / 2; const distX = mouseX - btnCenterX; const distY = mouseY - btnCenterY; const distance = Math.hypot(distX, distY); if (distance < SAFE_DISTANCE) { // spočítáme směr pohybu const moveX = (distX / distance) * -MOVE_STEP; const moveY = (distY / distance) * -MOVE_STEP; btn.style.transform = `translate(${moveX}px, ${moveY}px)`; } else { btn.style.transform = `translate(0, 0)`; } }); })();
script> (function(){ // ===================== // 0) KONFIGURACE // ===================== const SECRET_URL = 'https://tvoje-url-na-bonus.example'; // ← zaměň za svůj odkaz const USE_CAT = true; // vypni na false, pokud nechceš kočku // Pomocné const clamp = (v,min,max)=>Math.max(min,Math.min(max,v)); const vw = ()=>window.innerWidth; const vh = ()=>window.innerHeight; // ===================== // 1) TELEPORT CTA // .btn-teleport // ===================== (function teleportCTA(){ const btns = document.querySelectorAll('.btn-teleport'); if (!btns.length) return; btns.forEach(btn=>{ let hops = 0; const MAX_HOPS = 6; // kolikrát max. uteče, pak se nechá kliknout btn.addEventListener('pointerenter', ()=>{ if (hops >= MAX_HOPS) return; hops++; const margin = 40; // okraj od hran const rect = btn.getBoundingClientRect(); const w = rect.width, h = rect.height; // náhodná pozice uvnitř viewportu const x = clamp(Math.random()*(vw()-w-2*margin)+margin, margin, vw()-w-margin); const y = clamp(Math.random()*(vh()-h-2*margin)+margin, margin, vh()-h-margin); // dočasně fixed btn.classList.add('teleporting'); btn.style.left = `${x}px`; btn.style.top = `${y}px`; // malý „poof“ btn.animate([ { transform:'scale(0.9) rotate(-3deg)' }, { transform:'scale(1.0) rotate(0deg)' } ], { duration: 180, easing:'ease-out' }); // po posledním hopu vrátíme normální tok (při dalším hoveru už neutíká) if (hops >= MAX_HOPS) { setTimeout(()=>{ btn.classList.remove('teleporting'); btn.style.left = ''; btn.style.top = ''; }, 50); } }, { passive:true }); }); })(); // ===================== // 2) PROGRESIVNÍ TEXT CTA // .btn-progress // ===================== (function progressiveText(){ const btns = document.querySelectorAll('.btn-progress'); if (!btns.length) return; const LINES = [ 'klikni mě 🤝', 'tak co, dáš to? 👀', 'prosím… 🥺', 'naposledy to zkusím 🙏', 'ok, tvoje ztráta 😢' ]; btns.forEach(btn=>{ let i = 0; const orig = btn.textContent.trim(); btn.addEventListener('pointerenter', ()=>{ btn.textContent = LINES[i] || LINES[LINES.length-1]; btn.classList.add('progress-pop'); setTimeout(()=>btn.classList.remove('progress-pop'), 140); i = Math.min(i+1, LINES.length-1); }, { passive:true }); btn.addEventListener('pointerleave', ()=>{ // nech text chvilku, reset až po 1.5 s mimo btn const savedI = i; setTimeout(()=>{ if (!btn.matches(':hover')) { btn.textContent = orig; i = savedI; // nepřepisuj „pokrok“ uživatele } }, 1500); }, { passive:true }); }); })(); // ===================== // 3) „LEPKAVÝ KURZOR“ NA CLICK // .btn-sticky // ===================== (function stickyCursor(){ const btns = document.querySelectorAll('.btn-sticky'); if (!btns.length) return; btns.forEach(btn=>{ btn.addEventListener('click', (e)=>{ // brzký exit pro ctrl/cmd click if (e.metaKey || e.ctrlKey) return; e.preventDefault(); const href = (btn.tagName==='A' && btn.href) ? btn.href : null; // vytvoř ghost emoji const ghost = document.createElement('div'); ghost.className = 'sticky-ghost'; ghost.textContent = '⛓️'; document.body.appendChild(ghost); // button následuje kurzor btn.classList.add('following'); const move = (ev)=>{ const x = ev.clientX, y = ev.clientY; ghost.style.left = x+'px'; ghost.style.top = y+'px'; // drž tlačítko kousek pod kurzorem const rect = btn.getBoundingClientRect(); btn.style.left = (x - rect.width/2) + 'px'; btn.style.top = (y + 24) + 'px'; }; const mm = (ev)=>move(ev); window.addEventListener('mousemove', mm, { passive:true }); // po 1.6 s „odlep“ a případně přejdi setTimeout(()=>{ window.removeEventListener('mousemove', mm); ghost.remove(); btn.classList.remove('following'); btn.style.left = ''; btn.style.top = ''; // roztomilý „spád“ anim btn.animate([ { transform:'translateY(-6px)' }, { transform:'translateY(0)' } ], { duration: 180, easing:'ease-out' }); if (href) window.location.assign(href); }, 1600); }); }); })(); // ===================== // 4) EASTER EGG: HON NA KOČKU 🐱 → tajný bonus // ===================== (function easterCat(){ if (!USE_CAT) return; const cat = document.createElement('div'); cat.className = 'easter-cat'; cat.title = 'chyť mě!'; cat.textContent = '🐱'; document.body.appendChild(cat); function jump(){ const margin = 30, size = 40; const x = clamp(Math.random()*(vw()-size-2*margin)+margin, margin, vw()-size-margin); const y = clamp(Math.random()*(vh()-size-2*margin)+margin, margin, vh()-size-margin); cat.style.left = x + 'px'; cat.style.top = y + 'px'; } let hops = 0; const timer = setInterval(()=>{ jump(); hops++; if (hops>60) clearInterval(timer); }, 2500); cat.addEventListener('click', ()=>{ cat.textContent = '🎁'; cat.title = 'tajný bonus odemčen'; if (SECRET_URL) window.open(SECRET_URL, '_blank'); }); })(); // ============ UX / přístupnost poznámka ============ // Tyhle vtípky používej střídmě: spusť max 1–2 na stránce, ideálně jen na desktopu a otestuj v A/B. })();