Explorar o código

init UI a bit sooner

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
8e49e4fabe
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      extension/core/content/content.js

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

@@ -70,15 +70,15 @@ this.singlefile.top = this.singlefile.top || (() => {
 		options.url = options.url || document.location.href;
 		options.content = options.content || getDoctype(document) + document.documentElement.outerHTML;
 		await processor.initialize();
+		if (options.shadowEnabled) {
+			singlefile.ui.init();
+		}
 		if (options.removeHiddenElements) {
 			unmarkRemovedElements(processor.REMOVED_CONTENT_ATTRIBUTE_NAME);
 		}
 		if (options.compressHTML) {
 			unmarkPreserveElements(processor.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME);
 		}
-		if (options.shadowEnabled) {
-			singlefile.ui.init();
-		}
 		if (!options.removeFrames) {
 			removeWindowIdFrames(processor.WIN_ID_ATTRIBUTE_NAME);
 		}