@samitouri / QOS-React-2 / commits / efa780d0ab

Removed DT inject() script since it's no longer being used

Brian Vaughn committed Sep 11, 2019 at 09:51 UTC efa780d0abfd2d247a863ade0bd41f31ba2c6c9f
1 file changed -24
packages/react-devtools-extensions/src/inject.js deleted
-24
@@ -1,24 +0,0 @@
1 -/* global chrome */
2 -
3 -export default function inject(scriptName: string, done: ?Function) {
4 - const source = `
5 - // the prototype stuff is in case document.createElement has been modified
6 - (function () {
7 - var script = document.constructor.prototype.createElement.call(document, 'script');
8 - script.src = "${scriptName}";
9 - script.charset = "utf-8";
10 - document.documentElement.appendChild(script);
11 - script.parentNode.removeChild(script);
12 - })()
13 - `;
14 -
15 - chrome.devtools.inspectedWindow.eval(source, function(response, error) {
16 - if (error) {
17 - console.log(error);
18 - }
19 -
20 - if (typeof done === 'function') {
21 - done();
22 - }
23 - });
24 -}