@@ -80,9 +80,15 @@ chrome.runtime.onInstalled.addListener(async function (object) {
8080 version : version ,
8181 } ) ;
8282 if ( storedVersion && storedVersion !== version ) {
83- await chrome . tabs . create ( {
84- url : "/changelog/index.html" ,
85- } ) ;
83+ if ( version === "3.0.0" ) {
84+ await chrome . tabs . create ( {
85+ url : "/changelog/3/index.html" ,
86+ } ) ;
87+ } else {
88+ await chrome . tabs . create ( {
89+ url : "/changelog/index.html" ,
90+ } ) ;
91+ }
8692 }
8793 }
8894 if (
@@ -150,13 +156,15 @@ chrome.storage.onChanged.addListener(async function (changes, namespace) {
150156 chrome . runtime . sendMessage ( {
151157 msg : "installedThemesUpdate" ,
152158 value : newValue ,
153- } )
159+ } ) ;
154160 }
155- if ( oldValue . find ( ( el ) => el . active ) !== newValue . find ( ( el ) => el . active ) ) {
161+ if (
162+ oldValue . find ( ( el ) => el . active ) !== newValue . find ( ( el ) => el . active )
163+ ) {
156164 chrome . runtime . sendMessage ( {
157165 msg : "themeUpdate" ,
158166 value : newValue . find ( ( el ) => el . active ) ,
159- } )
167+ } ) ;
160168 }
161169 }
162170 }
@@ -602,15 +610,15 @@ chrome.runtime.onMessageExternal.addListener(async function (
602610) {
603611 if ( msg . msg === "openSupportChat" ) {
604612 await chrome . tabs . create ( {
605- url : "/extras/support/chat/index.html?code=" + msg . code
606- } )
607- chrome . tabs . remove ( sender . tab . id , function ( ) { } ) ;
613+ url : "/extras/support/chat/index.html?code=" + msg . code ,
614+ } ) ;
615+ chrome . tabs . remove ( sender . tab . id , function ( ) { } ) ;
608616 }
609617 if ( msg . msg === "openFeedbackPage" ) {
610618 await chrome . tabs . create ( {
611- url : "/extras/feedback/index.html?code=" + msg . code
612- } )
613- chrome . tabs . remove ( sender . tab . id , function ( ) { } ) ;
619+ url : "/extras/feedback/index.html?code=" + msg . code ,
620+ } ) ;
621+ chrome . tabs . remove ( sender . tab . id , function ( ) { } ) ;
614622 }
615623 if ( msg === "openSettings" ) {
616624 await chrome . tabs . create ( {
@@ -668,7 +676,7 @@ chrome.runtime.onMessage.addListener(async function (
668676 if ( msg . msg === "openSupportAuth" ) {
669677 chrome . tabs . create ( {
670678 url : "https://scratch.mit.edu/scratchtools/support/auth/" ,
671- } )
679+ } ) ;
672680 }
673681 if ( msg . action === "getStyles" ) {
674682 sendResponse ( { data : cachedStyles } ) ;
0 commit comments