Ver código fonte

code formatting

Gildas 7 anos atrás
pai
commit
a8d6b8e19f

+ 2 - 2
extension/core/content/content.js

@@ -117,7 +117,7 @@ this.singlefile.top = this.singlefile.top || (() => {
 				try {
 					await browser.runtime.sendMessage({ processProgress: true, index: event.details.index, maxIndex: event.details.max });
 				} catch (error) {
-					// ignored
+					/* ignored */
 				}
 				if (options.shadowEnabled) {
 					singlefile.ui.onprogress(event);
@@ -126,7 +126,7 @@ this.singlefile.top = this.singlefile.top || (() => {
 				try {
 					await browser.runtime.sendMessage({ processEnd: true });
 				} catch (error) {
-					// ignored
+					/* ignored */
 				}
 			}
 		};

+ 2 - 2
lib/browser-polyfill/custom-browser-polyfill.js

@@ -146,11 +146,11 @@
 								.then(response => {
 									sendResponse(response);
 									if (chrome.runtime.lastError) {
-										// ignored
+										/* ignored */
 									}
 								})
 								.catch(() => {
-									// ignored
+									/* ignored */
 								});
 							return true;
 						}

+ 1 - 1
lib/single-file/htmlmini.js

@@ -243,7 +243,7 @@ this.htmlmini = this.htmlmini || (() => {
 		if (node.nodeType == Node.ELEMENT_NODE && node.tagName == "SCRIPT" && node.type == "application/ld+json" && node.textContent.trim()) {
 			try {
 				node.textContent = JSON.stringify(JSON.parse(node.textContent));
-			} catch (e) {
+			} catch (error) {
 				/* ignored */
 			}
 		}

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

@@ -880,7 +880,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 							const dataURI = await batchRequest.addURL(new URL(resourceURL, baseURI).href);
 							resourceElement.setAttribute(attributeName, dataURI);
 						} catch (error) {
-							// ignored
+							/* ignored */
 						}
 					}
 				}
@@ -897,7 +897,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 							const dataURI = await batchRequest.addURL(new URL(resourceURL, baseURI).href);
 							return dataURI + (srcsetValue.w ? " " + srcsetValue.w + "w" : srcsetValue.d ? " " + srcsetValue.d + "x" : "");
 						} catch (error) {
-							// ignored
+							/* ignored */
 						}
 					}
 				}));