From 737e6317ef479a44c8a7308ced47dba21e5ef8ca Mon Sep 17 00:00:00 2001 From: ThinLiquid Date: Sat, 11 May 2024 22:00:33 +0100 Subject: [PATCH] Update main.ts --- src/main.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 736a923..23666d7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -48,8 +48,12 @@ if (params.has('crt')) { document.body.classList.add('crt') } if (params.has('debug')) { - const { default: eruda } = await import('eruda') - eruda.init() + ;(function () { + var src = '//cdn.jsdelivr.net/npm/eruda'; + if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return; + document.write(''); + document.write('eruda.init();'); + })(); } const auth = (): SpotifyApi => SpotifyApi.withUserAuthorization(