@@ -289,7 +289,7 @@ chrome.tabs.onUpdated.addListener(async function (tabId, info) {
289289 window . location . href = url ;
290290 }
291291 } else if (
292- tab . url ?. startsWith ( "https://scratch.mit.edu/scratchtools/support/auth /" )
292+ tab . url ?. startsWith ( "https://scratch.mit.edu/ste/dashboard/verify /" )
293293 ) {
294294 if ( info . status === "loading" ) {
295295 await chrome . scripting . executeScript ( {
@@ -303,7 +303,7 @@ chrome.tabs.onUpdated.addListener(async function (tabId, info) {
303303 }
304304 await chrome . scripting . executeScript ( {
305305 target : { tabId : tabId } ,
306- files : [ `/extras/support/ page.js` ] ,
306+ files : [ `/extras/page.js` ] ,
307307 world : "MAIN" ,
308308 } ) ;
309309 }
@@ -665,13 +665,19 @@ chrome.runtime.onMessageExternal.addListener(async function (
665665) {
666666 if ( msg . msg === "openSupportChat" ) {
667667 await chrome . tabs . create ( {
668- url : "/extras/support/chat/index.html?code=" + msg . code ,
668+ url : "/extras/support/chat/index.html?code=" + msg . token ,
669+ } ) ;
670+ chrome . tabs . remove ( sender . tab . id , function ( ) { } ) ;
671+ }
672+ if ( msg . msg === "openDashboardPage" ) {
673+ await chrome . tabs . create ( {
674+ url : "/extras/dashboard/index.html?code=" + msg . token + "&username=" + msg . username ,
669675 } ) ;
670676 chrome . tabs . remove ( sender . tab . id , function ( ) { } ) ;
671677 }
672678 if ( msg . msg === "openFeedbackPage" ) {
673679 await chrome . tabs . create ( {
674- url : "/extras/feedback/index.html?code=" + msg . code ,
680+ url : "/extras/feedback/index.html?code=" + msg . token ,
675681 } ) ;
676682 chrome . tabs . remove ( sender . tab . id , function ( ) { } ) ;
677683 }
0 commit comments