@@ -36,7 +36,6 @@ browser.browserAction.onClicked.addListener(() => {
3636function broadcastUpdate ( isEnabled ) {
3737 browser . tabs . query ( { url : 'https://www.twitch.tv/*' } )
3838 . then ( ( tabs ) => {
39- console . log ( 'tabs' , tabs ) ;
4039 for ( let i = 0 ; i < tabs . length ; i ++ ) {
4140 const tab = tabs [ i ] ;
4241 emitStatus ( tab . id , isEnabled ) ;
@@ -57,7 +56,6 @@ function unlockForTab(tabId) {
5756}
5857
5958browser . storage . onChanged . addListener ( ( changes , areaName ) => {
60- console . log ( 'changed' , changes ) ;
6159 if ( areaName === 'local' && changes . isEnabled && changes . isEnabled . newValue !== undefined ) {
6260 isEnabled = changes . isEnabled . newValue ;
6361 if ( isEnabled ) {
@@ -72,16 +70,12 @@ browser.storage.onChanged.addListener((changes, areaName) => {
7270const redirectedToTwitch = { } ;
7371
7472browser . tabs . onUpdated . addListener ( ( tabId , changeInfo , tab ) => {
75- console . log ( redirectedToTwitch ) ;
7673 if ( changeInfo . status === 'loading' ) {
77- console . log ( 'changeInfo' , changeInfo ) ;
7874 if ( twitchUrlRegexp . test ( changeInfo . url ) ) {
7975 unlockForTab ( tabId ) ;
80- console . log ( 'loading' , tab . url ) ;
8176 redirectedToTwitch [ tabId ] = true ;
8277 // if was on twitch, but is redirecting outside
8378 } else if ( redirectedToTwitch [ tabId ] ) {
84- console . log ( 'bye twitch' ) ;
8579 lockForTab ( tabId ) ;
8680 delete redirectedToTwitch [ tabId ] ;
8781 } else if ( ! twitchUrlRegexp . test ( changeInfo . url ) ) {
0 commit comments