File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,6 @@ chrome.runtime.onConnect.addListener(port => {
181
181
182
182
// background.js recieves message from contentScript.js
183
183
chrome . runtime . onMessage . addListener ( ( request , sender ) => {
184
- console . log ( 'this is request from background' , request )
185
184
// IGNORE THE AUTOMATIC MESSAGE SENT BY CHROME WHEN CONTENT SCRIPT IS FIRST LOADED
186
185
if ( request . type === 'SIGN_CONNECT' ) {
187
186
return true ;
@@ -346,11 +345,10 @@ chrome.tabs.onRemoved.addListener(tabId => {
346
345
347
346
// when a new url is loaded on the same tab, this remove the tabid from the tabsObj, recreate the tab and inject the script
348
347
chrome . tabs . onUpdated . addListener ( ( tabId , changeInfo ) => {
349
- console . log ( 'this is tabId from background on Updates' , tabId )
350
- console . log ( 'this is changeInfo from background on Updates' , changeInfo )
351
- console . log ( 'this is tabsObj[tabId].title from background on Updates' , tabsObj [ tabId ] . title )
348
+
349
+ // check if the tab title changed to see if tab need to restart
352
350
if ( changeInfo . title && changeInfo . title !== tabsObj [ tabId ] . title ) {
353
- console . log ( 'need restart tab object' )
351
+
354
352
// tell devtools which tab to delete
355
353
if ( portsArr . length > 0 ) {
356
354
portsArr . forEach ( bg =>
You can’t perform that action at this time.
0 commit comments