import type { ThemesData , UserStorageData } from './types' ; chrome . runtime . onInstalled . addListener ( ( ) => { void fetch ( 'themes.json' ) . then ( ( res ) => res . json ( ) ) . then ( ( themesData ) => { chrome . storage . local . get ( null , ( settings ) => { localStorage . t = themesData [ settings . t || 'light' ] ; } ) ; } ) ; } ) ;