Răsfoiți Sursa

yet another (stange) fix for Firefox

Gildas 7 ani în urmă
părinte
comite
9b1e124769
2 a modificat fișierele cu 5 adăugiri și 16 ștergeri
  1. 2 2
      extension/ui/scripts/content/ui.js
  2. 3 14
      lib/single-file/parse-srcset.js

+ 2 - 2
extension/ui/scripts/content/ui.js

@@ -18,9 +18,9 @@
  *   along with SingleFile.  If not, see <http://www.gnu.org/licenses/>.
  *   along with SingleFile.  If not, see <http://www.gnu.org/licenses/>.
  */
  */
 
 
-/* global singlefile, document */
+/* global document */
 
 
-singlefile.ui = (() => {
+this.singlefile.ui = (() => {
 
 
 	const MASK_TAGNAME = "singlefile-mask";
 	const MASK_TAGNAME = "singlefile-mask";
 
 

+ 3 - 14
lib/single-file/parse-srcset.js

@@ -14,19 +14,7 @@
  * (except for comments in parens).
  * (except for comments in parens).
  */
  */
 
 
-/* global window */
-
-(function (root, factory) {
-	if (typeof module === "object" && module.exports) {
-		// Node. Does not work with strict CommonJS, but
-		// only CommonJS-like environments that support module.exports,
-		// like Node.
-		module.exports = factory();
-	} else {
-		// Browser globals (root is window)
-		root.parseSrcset = factory();
-	}
-}(window, function () {
+this.parseSrcset = (() => {
 
 
 	// 1. Let input be the value passed to this algorithm.
 	// 1. Let input be the value passed to this algorithm.
 	return function (input) {
 	return function (input) {
@@ -327,4 +315,5 @@
 		} // (close parseDescriptors fn)
 		} // (close parseDescriptors fn)
 
 
 	};
 	};
-}));
+
+})();