From b13809feea21945c88eb8e9ba6d28f4449456acc Mon Sep 17 00:00:00 2001 From: seo Date: Wed, 12 Aug 2026 21:35:19 +0900 Subject: [PATCH] Update findmydevice asset reload wiring --- js/main.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index f7797ba..6654d5f 100644 --- a/js/main.js +++ b/js/main.js @@ -2,12 +2,23 @@ if (window.__customAssetReloadLoader) return; window.__customAssetReloadLoader = true; const script = document.createElement('script'); - script.src = '/custom/common/js/asset-reload.js?v=1784975993-388ae57eaf'; + script.src = '/custom/common/js/asset-reload.js?v=942f02c002c7a86e'; script.dataset.service = 'findmydevice'; script.defer = true; document.head.appendChild(script); })(); +function isFindmydeviceLoginBlockedAllowedHomePage() { + const path = location.pathname.toLowerCase(); + return location.protocol === 'https:' && location.hostname === 'chaegeon.com' && (path === '/' || path === '/home' || path.startsWith('/home/')); +} + +function replaceFindmydeviceToChaegeonHome() { + if (isFindmydeviceLoginBlockedAllowedHomePage()) return false; + location.replace('https://chaegeon.com/'); + return true; +} + const deviceLang = (navigator.language || navigator.userLanguage || "en").startsWith("ko") ? "ko" : "en", translations = { ko: { @@ -653,7 +664,7 @@ const findmydeviceAuthPromise = FINDMYDEVICE_AUTH_REQUIRED .then(res => res.ok ? res.json() : Promise.reject()) .then(session => { if (session.loginBlocked) { - location.replace('https://chaegeon.com/'); + replaceFindmydeviceToChaegeonHome(); return false; } findmydeviceAuthenticated = !!session.authenticated || (isStandalonePwa() && !!session.pwaAuthenticated);