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