Quellcode durchsuchen

replaced "window" with this

Gildas vor 7 Jahren
Ursprung
Commit
e6b45fd133
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 2 2
      lib/fetch/content/fetch.js
  2. 2 2
      lib/single-file/single-file-browser.js

+ 2 - 2
lib/fetch/content/fetch.js

@@ -18,9 +18,9 @@
  *   along with SingleFile.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/* global window, Blob */
+/* global Blob */
 
-window.superFetch = (() => {
+this.superFetch = (() => {
 
 	const browser = this.browser || this.chrome;
 

+ 2 - 2
lib/single-file/single-file-browser.js

@@ -18,7 +18,7 @@
  *   along with SingleFile.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/* global SingleFileCore, base64, DOMParser, getComputedStyle, TextDecoder, window, fetch, parseSrcset, uglifycss */
+/* global SingleFileCore, base64, DOMParser, getComputedStyle, TextDecoder, fetch, parseSrcset, uglifycss */
 
 this.SingleFile = (() => {
 
@@ -37,7 +37,7 @@ this.SingleFile = (() => {
 			};
 			let resourceContent;
 			try {
-				resourceContent = await (window.superFetch || fetch)(resourceURL, requestOptions);
+				resourceContent = await (this.superFetch || fetch)(resourceURL, requestOptions);
 			} catch (e) {
 				return asDataURI ? "data:base64," : "";
 			}