Skip to content

Commit ba07383

Browse files
committed
Removed old way of injecting timeTravel and DLL from inject_script_tags file.
1 parent 6096e91 commit ba07383

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

src/browser/chrome/scripts/inject_script_tags.js

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,8 @@
33
let lastReceivedMsgTime = null;
44
chrome.runtime.onMessage.addListener((msg) => {
55
if (msg.codeString) scheduleWork(msg);
6-
else if (msg.injectScripts) injectScripts();
76
});
87

9-
function injectScripts() {
10-
console.log('injecting scripts...');
11-
// We add a <script> tag to the DOM with our script files as the src attribute.
12-
// We need this because our content-injected scripts are executed in an "isolated
13-
// world" environment. BUT for the scripts below, we want the edited-React libraries
14-
// to have access to the their functionalities.
15-
const linkedListScript = document.createElement('script');
16-
linkedListScript.src = chrome.runtime.getURL('scripts/linked_list.js');
17-
(document.head || document.documentElement).appendChild(linkedListScript);
18-
19-
const timeTravelScript = document.createElement('script');
20-
timeTravelScript.src = chrome.runtime.getURL('scripts/time_travel.js');
21-
(document.head || document.documentElement).appendChild(timeTravelScript);
22-
23-
const deepCloneScript = document.createElement('script');
24-
deepCloneScript.src = chrome.runtime.getURL('scripts/deepclone_bundle.js');
25-
(document.head || document.documentElement).appendChild(deepCloneScript);
26-
27-
// linkedListScript.onload =
28-
deepCloneScript.onload = timeTravelScript.onload = function removeScriptTag() {
29-
this.remove();
30-
};
31-
}
32-
338
function scheduleWork(work) {
349
// We want to add the scripts to a work array. When its been 100s
3510
// without receiving any new scripts, then we sort the array and
@@ -59,4 +34,4 @@
5934
};
6035
}
6136
}
62-
}())
37+
}());

0 commit comments

Comments
 (0)