Skip to content

Commit 85d73ef

Browse files
RobbyTiptonfscgoldenjoeeparkdavidkim7773khobread
committed
Committing edits made during code review.
Co-authored-by: Chris LeBrett <[email protected]> Co-authored-by: Robby Tipton <[email protected]> Co-authored-by: Joseph Park <[email protected]> Co-authored-by: David Kim <[email protected]> Co-authored-by: Kevin HoEun Lee <[email protected]>
1 parent 70780a6 commit 85d73ef

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

src/extension/background.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ function changeCurrLocation(tabObj, rootNode, index, name) {
124124

125125
// Establishing incoming connection with devtools.
126126
chrome.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
225220
chrome.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,

src/extension/build/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Reactime",
3-
"version": "13.0.0",
3+
"version": "14.0.0",
44
"devtools_page": "devtools.html",
55
"description": "A Chrome extension that helps debug React applications by memorizing the state of components with every render.",
66
"manifest_version": 3,

src/extension/contentScript.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ let firstMessage = true;
1313
let isRecording = true;
1414

1515
window.addEventListener('message', msg => {
16-
console.log('Hello from line 16');
17-
console.log('msg is', msg.data);
1816
// Event listener runs constantly based on actions
1917
// recorded on the test application from backend files (linkFiber.ts).
2018
// Background.js has a listener that includes switch cases, depending on
@@ -84,5 +82,4 @@ getCLS(gatherMetrics);
8482

8583
// Send message to background.js for injecting the initial script
8684
// into the app's DOM.
87-
console.log('Hello from line 86');
8885
chrome.runtime.sendMessage({ action: 'injectScript' });

0 commit comments

Comments
 (0)