Przeglądaj źródła

init UI a bit sooner

Gildas 7 lat temu
rodzic
commit
8e49e4fabe
1 zmienionych plików z 3 dodań i 3 usunięć
  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);
 		}