File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 if ( yearEl ) yearEl . textContent = new Date ( ) . getFullYear ( ) ;
88
99 // Theme init
10- const saved = localStorage . getItem ( 'theme' ) ;
11- if ( saved === 'light' ) { root . classList . add ( 'light' ) ; toggle && ( toggle . textContent = '☀️' ) ; }
10+ try {
11+ const saved = localStorage . getItem ( 'metridex.theme' ) || localStorage . getItem ( 'theme' ) ;
12+ if ( saved === 'light' ) { root . classList . add ( 'light' ) ; if ( toggle ) toggle . textContent = '☀️' ; }
13+ } catch ( e ) { }
1214 toggle && toggle . addEventListener ( 'click' , ( ) => {
1315 root . classList . toggle ( 'light' ) ;
1416 const isLight = root . classList . contains ( 'light' ) ;
15- localStorage . setItem ( 'theme' , isLight ? 'light' : 'dark' ) ;
17+ try { localStorage . setItem ( 'metridex. theme' , isLight ? 'light' : 'dark' ) ; } catch ( e ) { }
1618 toggle . textContent = isLight ? '☀️' : '🌙' ;
1719 } ) ;
1820
2224 burger . setAttribute ( 'aria-expanded' , open ? 'true' : 'false' ) ;
2325 } ) ;
2426
25- // Normalize CTAs to bot
26- const botLinks = document . querySelectorAll ( '.cta-bot, #connect-bot, a[data-bot]' ) ;
27- botLinks . forEach ( a => { a . href = 'https://t.me/MetridexBot' ; a . target = '_blank' ; a . rel = 'noopener' ; } ) ;
27+ // Normalize bot CTAs
28+ document . querySelectorAll ( '.cta-bot' ) . forEach ( a => {
29+ a . href = 'https://t.me/MetridexBot' ; a . target = '_blank' ; a . rel = 'noopener' ;
30+ } ) ;
2831} ) ( ) ;
You can’t perform that action at this time.
0 commit comments