Kaynağa Gözat

remove obsolete "use strict"

Gildas 5 yıl önce
ebeveyn
işleme
f30d01f99d

+ 0 - 4
extension/lib/gdrive/gdrive.js

@@ -23,10 +23,6 @@
 
 /* global browser, fetch, setInterval */
 
-
-
-"use strict";
-
 const TOKEN_URL = "https://oauth2.googleapis.com/token";
 const AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
 const REVOKE_ACCESS_URL = "https://accounts.google.com/o/oauth2/revoke";

+ 0 - 2
extension/lib/single-file/frame-tree/bg/frame-tree.js

@@ -23,8 +23,6 @@
 
 /* global browser */
 
-"use strict";
-
 browser.runtime.onMessage.addListener((message, sender) => {
 	if (message.method == "singlefile.frameTree.initResponse" || message.method == "singlefile.frameTree.ackInitRequest") {
 		browser.tabs.sendMessage(sender.tab.id, message, { frameId: 0 });

+ 0 - 2
extension/lib/single-file/lazy/bg/lazy-timeout.js

@@ -23,8 +23,6 @@
 
 /* global browser, setTimeout, clearTimeout */
 
-"use strict";
-
 const timeouts = new Map();
 
 browser.runtime.onMessage.addListener((message, sender) => {

+ 21 - 28
extension/lib/woleet/woleet.js

@@ -20,32 +20,25 @@
  *   notice and a URL through which recipients can access the Corresponding 
  *   Source.
  */
-
 /* global fetch */
-
-this.woleet = this.woleet || (() => {
-
-	const urlService = "https://api.woleet.io/v1/anchor";
-	const apiKey = "__WOLEET_API_KEY__";
-
-	return {
-		anchor
-	};
-
-	async function anchor(hash) {
-		return (await fetch(urlService, {
-			method: "POST",
-			headers: {
-				"Accept": "application/json",
-				"Content-Type": "application/json",
-				"Authorization": "Bearer " + apiKey
-			},
-			body: JSON.stringify({
-				"name": hash,
-				"hash": hash,
-				"public": true
-			})
-		})).json();
-	}
-
-})();
+const urlService = "https://api.woleet.io/v1/anchor";
+const apiKey = "__WOLEET_API_KEY__";
+export {
+	anchor
+};
+async function anchor(hash) {
+	return (await fetch(urlService, {
+		method: "POST",
+		headers: {
+			"Accept": "application/json",
+			"Content-Type": "application/json",
+			"Authorization": "Bearer " + apiKey
+		},
+		body: JSON.stringify({
+			"name": hash,
+			"hash": hash,
+			"public": true
+		})
+	}))
+		.json();
+}

+ 0 - 2
lib/single-file/vendor/mime-type-parser.js

@@ -46,8 +46,6 @@
  * SOFTWARE.
  */
 
-"use strict";
-
 let utils, parser, serializer, MIMEType;
 
 // lib/utils.js