Przeglądaj źródła

removed unnecessary code

Former-commit-id: 293f02054e8fdb009c634a27823f017f85fa074d
Gildas 6 lat temu
rodzic
commit
4723a4dbaf

+ 1 - 3
lib/single-file/processors/lazy/content/content-lazy-loader.js

@@ -38,13 +38,11 @@ this.singlefile.lib.processors.lazy.content.loader = this.singlefile.lib.process
 	const removeEventListener = window.removeEventListener;
 
 	return {
-		process: options => {
+		process: async options => {
 			const maxScrollY = Math.max(document.documentElement.scrollHeight - (document.documentElement.clientHeight * 1.5), 0);
 			const maxScrollX = Math.max(document.documentElement.scrollWidth - (document.documentElement.clientWidth * 1.5), 0);
 			if (scrollY <= maxScrollY && scrollX <= maxScrollX) {
 				return process(options);
-			} else {
-				return Promise.resolve();
 			}
 		}
 	};

+ 0 - 2
lib/single-file/single-file-util.js

@@ -184,8 +184,6 @@ this.singlefile.lib.util = this.singlefile.lib.util || (() => {
 				async waitForUserScript(eventPrefixName) {
 					if (helper.waitForUserScript) {
 						return helper.waitForUserScript(eventPrefixName);
-					} else {
-						return Promise.resolve();
 					}
 				},
 				ON_BEFORE_CAPTURE_EVENT_NAME: helper.ON_BEFORE_CAPTURE_EVENT_NAME,