@@ -124,7 +124,6 @@ function changeCurrLocation(tabObj, rootNode, index, name) {
124124
125125// Establishing incoming connection with devtools.
126126chrome . runtime . onConnect . addListener ( port => {
127- console . log ( 'Hello from line 126' ) ;
128127 // port is one end of the connection - an object
129128 // push every port connected to the ports array
130129 portsArr . push ( port ) ;
@@ -200,14 +199,10 @@ chrome.runtime.onConnect.addListener(port => {
200199 tabsObj [ tabId ] . mode . persist = payload ;
201200 return true ;
202201 case 'launchContentScript' :
203- // !!! in Manifest Version 3 this will need to be changed to the commented out code below !!!
204- console . log ( 'Youre here' ) ;
205202 chrome . scripting . executeScript ( {
206203 target : { tabId } ,
207204 files : [ 'bundles/content.bundle.js' ] ,
208205 } ) ;
209- // This line below will need to be removed
210- // chrome.tabs.executeScript(tabId, { file: 'bundles/content.bundle.js' });
211206 return true ;
212207 case 'jumpToSnap' :
213208 chrome . tabs . sendMessage ( tabId , msg ) ;
@@ -223,7 +218,6 @@ chrome.runtime.onConnect.addListener(port => {
223218
224219// background.js listening for a message from contentScript.js
225220chrome . runtime . onMessage . addListener ( ( request , sender , sendResponse ) => {
226- console . log ( 'Hello from line 224' ) ;
227221 // AUTOMATIC MESSAGE SENT BY CHROME WHEN CONTENT SCRIPT IS FIRST LOADED: set Content
228222 if ( request . type === 'SIGN_CONNECT' ) {
229223 return true ;
@@ -286,15 +280,13 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
286280 // This injects a script into the app that you're testing Reactime on,
287281 // so that Reactime's backend files can communicate with the app's DOM.
288282 case 'injectScript' : {
289- console . log ( 'Hello from line 287' ) ;
290-
291- const injectScript = ( file , tabId ) => {
283+ const injectScript = ( file , tab ) => {
292284 const htmlBody = document . getElementsByTagName ( 'body' ) [ 0 ] ;
293285 const script = document . createElement ( 'script' ) ;
294286 script . setAttribute ( 'type' , 'text/javascript' ) ;
295287 script . setAttribute ( 'src' , file ) ;
296288 // eslint-disable-next-line prefer-template
297- document . title = tabId + '-' + document . title ;
289+ document . title = tab + '-' + document . title ;
298290 htmlBody . appendChild ( script ) ;
299291 } ;
300292
@@ -428,7 +420,6 @@ chrome.runtime.onInstalled.addListener(() => {
428420 title : 'Reactime' ,
429421 contexts : [ 'page' , 'selection' , 'image' , 'link' ] ,
430422 } ) ;
431- console . log ( 'Context Menu Created' ) ;
432423} ) ;
433424
434425// when context menu is clicked, listen for the menuItemId,
0 commit comments