@@ -124,7 +124,6 @@ function changeCurrLocation(tabObj, rootNode, index, name) {
124
124
125
125
// Establishing incoming connection with devtools.
126
126
chrome . runtime . onConnect . addListener ( port => {
127
- console . log ( 'Hello from line 126' ) ;
128
127
// port is one end of the connection - an object
129
128
// push every port connected to the ports array
130
129
portsArr . push ( port ) ;
@@ -200,14 +199,10 @@ chrome.runtime.onConnect.addListener(port => {
200
199
tabsObj [ tabId ] . mode . persist = payload ;
201
200
return true ;
202
201
case 'launchContentScript' :
203
- // !!! in Manifest Version 3 this will need to be changed to the commented out code below !!!
204
- console . log ( 'Youre here' ) ;
205
202
chrome . scripting . executeScript ( {
206
203
target : { tabId } ,
207
204
files : [ 'bundles/content.bundle.js' ] ,
208
205
} ) ;
209
- // This line below will need to be removed
210
- // chrome.tabs.executeScript(tabId, { file: 'bundles/content.bundle.js' });
211
206
return true ;
212
207
case 'jumpToSnap' :
213
208
chrome . tabs . sendMessage ( tabId , msg ) ;
@@ -223,7 +218,6 @@ chrome.runtime.onConnect.addListener(port => {
223
218
224
219
// background.js listening for a message from contentScript.js
225
220
chrome . runtime . onMessage . addListener ( ( request , sender , sendResponse ) => {
226
- console . log ( 'Hello from line 224' ) ;
227
221
// AUTOMATIC MESSAGE SENT BY CHROME WHEN CONTENT SCRIPT IS FIRST LOADED: set Content
228
222
if ( request . type === 'SIGN_CONNECT' ) {
229
223
return true ;
@@ -286,15 +280,13 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
286
280
// This injects a script into the app that you're testing Reactime on,
287
281
// so that Reactime's backend files can communicate with the app's DOM.
288
282
case 'injectScript' : {
289
- console . log ( 'Hello from line 287' ) ;
290
-
291
- const injectScript = ( file , tabId ) => {
283
+ const injectScript = ( file , tab ) => {
292
284
const htmlBody = document . getElementsByTagName ( 'body' ) [ 0 ] ;
293
285
const script = document . createElement ( 'script' ) ;
294
286
script . setAttribute ( 'type' , 'text/javascript' ) ;
295
287
script . setAttribute ( 'src' , file ) ;
296
288
// eslint-disable-next-line prefer-template
297
- document . title = tabId + '-' + document . title ;
289
+ document . title = tab + '-' + document . title ;
298
290
htmlBody . appendChild ( script ) ;
299
291
} ;
300
292
@@ -428,7 +420,6 @@ chrome.runtime.onInstalled.addListener(() => {
428
420
title : 'Reactime' ,
429
421
contexts : [ 'page' , 'selection' , 'image' , 'link' ] ,
430
422
} ) ;
431
- console . log ( 'Context Menu Created' ) ;
432
423
} ) ;
433
424
434
425
// when context menu is clicked, listen for the menuItemId,
0 commit comments