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

This commit is contained in:
Brian Vaughn
2019-09-11 09:51:24 -07:00
parent 4290967d4c
commit efa780d0ab

View File

@@ -1,24 +0,0 @@
/* global chrome */
export default function inject(scriptName: string, done: ?Function) {
const source = `
// the prototype stuff is in case document.createElement has been modified
(function () {
var script = document.constructor.prototype.createElement.call(document, 'script');
script.src = "${scriptName}";
script.charset = "utf-8";
document.documentElement.appendChild(script);
script.parentNode.removeChild(script);
})()
`;
chrome.devtools.inspectedWindow.eval(source, function(response, error) {
if (error) {
console.log(error);
}
if (typeof done === 'function') {
done();
}
});
}