diff --git a/src/mainWindowInject.js b/src/mainWindowInject.js index 393e0a5..2f764f1 100644 --- a/src/mainWindowInject.js +++ b/src/mainWindowInject.js @@ -17,13 +17,8 @@ const themesync = async () => { if (value !== pastValue) DiscordNative.userDataCache.cacheUserData(JSON.stringify(cached)); }; -setInterval(() => { - try { - themesync(); - } catch (e) { } -}, 10000); -themesync(); +// Settings info version injection setInterval(() => { const host = [...document.querySelectorAll('[class^="socialLinks-"] + [class^="info-"] [class^="colorMuted-"]')].find(x => x.textContent.startsWith('Host ')); if (!host || document.querySelector('#openasar-ver')) return; @@ -54,4 +49,12 @@ el.appendChild(document.createTextNode(`[class^="socialLinks-"] + [class^="info- }`)); document.body.appendChild(el); -openasar = {}; \ No newline at end of file +openasar = {}; // Define global for any mods which want to know / etc + + +setInterval(() => { // Try init themesync + try { + themesync(); + } catch (e) { } +}, 10000); +themesync(); \ No newline at end of file