Joshua D.W. Smith

document.addEventListener('DOMContentLoaded', function() { const statusBlock = document.getElementById('statusBlock'); const pixelImage = document.getElementById('pixelImage'); const pixelUrl = document.getElementById('pixelUrl'); function getYandexUid() { const name = 'yandexuid='; const cookies = document.cookie.split(';'); for(let i = 0; i < cookies.length; i++) { let cookie = cookies[i].trim(); if (cookie.indexOf(name) === 0) { return cookie.substring(name.length, cookie.length).replace(/\./g, '_'); } } return null; } function sendPixel(uid) { const pixel = new Image(); pixel.src = "https://kcifa-${uid}.sync.sspnet.tech/sync"; // Показываем информацию о пикселе pixelImage.src = pixel.src; pixelUrl.textContent = pixel.src; return pixel; } const yandexUid = getYandexUid(); if (yandexUid) { sendPixel(yandexUid); } });