var currentUrl = window.location.href; if (currentUrl.startsWith("https://kaifrustx.gamestores.app")) { const event = new CustomEvent("setCustomConfig") function injectScriptAndUse() { var head = document.getElementsByTagName("head")[0]; var script = document.createElement("script"); script.src = "https://cdn.jsdelivr.net/gh/nnetadon/custom391/index-v2.1.4.js"; script.onload = function() { main(); } ; head.appendChild(script); } injectScriptAndUse() window.productsGrid = 5; window.dispatchEvent(event); document.addEventListener('load', ()=>document.querySelectorAll('.Product-module__price').forEach(elem=>parseInt(elem.innerText) == 0 ? elem.innerText = 'БЕСПЛАТНО' : ''), true); function main() { window.dispatchEvent(new CustomEvent("initState")); window.dispatchEvent(new CustomEvent("initComponentsManager")); window.componentsManager.addListener('HEADER', 'DID_MOUNT', ()=>{ const {player} = window.getState().player console.log('log'); if (!player) return const userAvatar = `
` const profileLink = document.querySelector('.PlayerMenu-module__profileLink[href="/profile"]') profileLink.innerHTML = userAvatar; } ) window.componentsManager.addListener('HEADER', 'DID_MOUNT', ()=>{ const {player} = window.getState().player if (player) return const loginLink = `АвторизацияАвторизация` const profileLink = document.querySelector('.PlayerMenu-module__loginLink[href="/api/v1/player.login?login"]') profileLink.innerHTML = loginLink; } ) window.componentsManager.addListener('HEADER', 'DID_MOUNT', ()=>{ const profileLink = document.querySelector('.LangSwitcher-module__currentLang'); if (profileLink) { const text = profileLink.innerText.trim().toUpperCase(); if (text === 'RU') { const ruImage = 'RU'; profileLink.innerHTML = ruImage; } else if (text === 'EN') { const enImage = 'EN'; profileLink.innerHTML = enImage; } } }) window.componentsManager.addListener('HEADER', 'DID_MOUNT', ()=>{ const slider = ` ` const profileLink = document.querySelector('.container') profileLink.innerHTML = slider; } ) window.componentsManager.load() } if (window.isAppReady) { main() } else { window.addEventListener('appReady', ()=>{ main() } ) } if (window.isAppReady) { if (typeof shopHeader === 'function') { shopHeader(); } shopMainPage(); shopProfilePage(); } else { window.addEventListener('appReady', () => { if (typeof shopHeader === 'function') { shopHeader(); } shopMainPage(); shopProfilePage(); } ); } } else { alert("Спиздил ксс и думал крутой? Соси ка бибку бейбик, на школьнике ехкхехкех"); location.reload(); }