|
|
@@ -21,7 +21,7 @@
|
|
|
* Source.
|
|
|
*/
|
|
|
|
|
|
-/* global browser, window, addEventListener, dispatchEvent, CustomEvent, document, HTMLDocument, FileReader, Blob, getFileContent */
|
|
|
+/* global browser, window, addEventListener, dispatchEvent, CustomEvent, document, HTMLDocument, FileReader, Blob */
|
|
|
|
|
|
this.singlefile.lib.hooks.content.frame = this.singlefile.lib.hooks.content.frame || (() => {
|
|
|
|
|
|
@@ -36,8 +36,8 @@ this.singlefile.lib.hooks.content.frame = this.singlefile.lib.hooks.content.fram
|
|
|
let scriptElement = document.createElement("script");
|
|
|
if (typeof browser !== "undefined" && browser.runtime && browser.runtime.getURL) {
|
|
|
scriptElement.src = browser.runtime.getURL("/lib/hooks/content/content-hooks-web.js");
|
|
|
- } else if (typeof getFileContent !== "undefined") {
|
|
|
- scriptElement.textContent = getFileContent("/lib/hooks/content/content-hooks-web.js");
|
|
|
+ } else if (this.singlefile.lib.getFileContent) {
|
|
|
+ scriptElement.textContent = this.singlefile.lib.getFileContent("/lib/hooks/content/content-hooks-web.js");
|
|
|
}
|
|
|
(document.documentElement || document).appendChild(scriptElement);
|
|
|
scriptElement.remove();
|