Skip to content

Commit 4fe02c6

Browse files
committed
rid of commented code
1 parent 8329ac9 commit 4fe02c6

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/extension/background.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,10 @@ chrome.runtime.onConnect.addListener((port) => {
1919
// if snapshots were saved in the snapshots,
2020
// send it to devtools as soon as connection to devtools is made
2121
if (Object.values(tabsObj)[0].snapshots.length > 0) {
22-
// later we want to send the entire tabsObj to devTools
23-
// but currently since devTools can only handle one tab at a time
24-
// we will test our obj assuming that the user opened only one tab
25-
// below is what we want the postMessage to look like eventually
26-
// ---------------------------------------------------------------
2722
bg.postMessage({
2823
action: 'initialConnectSnapshots',
2924
payload: tabsObj,
3025
});
31-
// ---------------------------------------------------------------
32-
// bg.postMessage({
33-
// action: 'initialConnectSnapshots',
34-
// payload: {
35-
// snapshots: Object.values(tabsObj)[0].snapshots,
36-
// mode: Object.values(tabsObj)[0].mode,
37-
// },
38-
// });
3926
}
4027

4128
// receive snapshot from devtools and send it to contentScript
@@ -98,9 +85,6 @@ chrome.runtime.onMessage.addListener((request, sender) => {
9885

9986
const { persist } = tabsObj[tabId].mode;
10087

101-
console.log('request: ', request)
102-
console.log('sender: ', sender)
103-
10488
switch (action) {
10589
case 'tabReload':
10690
tabsObj[tabId].firstSnapshot = true;
@@ -114,13 +98,6 @@ chrome.runtime.onMessage.addListener((request, sender) => {
11498
// don't add anything to snapshot storage if mode is persisting for the initial snapshot
11599
if (!persist) tabsObj[tabId].snapshots.push(request.payload);
116100
if (bg) {
117-
// bg.postMessage({
118-
// action: 'initialConnectSnapshots',
119-
// payload: {
120-
// snapshots: tabsObj[tabId].snapshots,
121-
// mode: tabsObj[tabId].mode,
122-
// },
123-
// });
124101
console.log('connecting');
125102
bg.postMessage({
126103
action: 'initialConnectSnapshots',
@@ -134,10 +111,6 @@ chrome.runtime.onMessage.addListener((request, sender) => {
134111

135112
// send message to devtools
136113
if (bg) {
137-
// bg.postMessage({
138-
// action: 'sendSnapshots',
139-
// payload: tabsObj[tabId].snapshots,
140-
// });
141114
bg.postMessage({
142115
action: 'sendSnapshots',
143116
payload: tabsObj,

0 commit comments

Comments
 (0)