|
|
@@ -2004,7 +2004,7 @@ pre code {
|
|
|
|
|
|
let NOTES_WEB_STYLESHEET, MASK_WEB_STYLESHEET, HIGHLIGHTS_WEB_STYLESHEET;
|
|
|
let selectedNote, anchorElement, maskNoteElement, maskPageElement, highlightSelectionMode, removeHighlightMode, resizingNoteMode, movingNoteMode, highlightColor, collapseNoteTimeout, cuttingOuterMode, cuttingMode, cuttingTouchTarget, cuttingPath, cuttingPathIndex, previousContent;
|
|
|
- let removedElements = [], removedElementIndex = 0, initScriptContent, pageResources, pageUrl, pageCompressContent, includeInfobar;
|
|
|
+ let removedElements = [], removedElementIndex = 0, initScriptContent, pageResources, pageUrl, pageCompressContent, includeInfobar, openInfobar;
|
|
|
|
|
|
globalThis.zip = singlefile.helper.zip;
|
|
|
initEventListeners();
|
|
|
@@ -2100,6 +2100,7 @@ pre code {
|
|
|
if (message.method == "getContent") {
|
|
|
onUpdate(true);
|
|
|
includeInfobar = message.includeInfobar;
|
|
|
+ openInfobar = message.openInfobar;
|
|
|
let content = getContent(message.compressHTML, message.updatedResources);
|
|
|
if (initScriptContent) {
|
|
|
content = content.replace(/<script data-template-shadow-root src.*?<\/script>/g, initScriptContent);
|
|
|
@@ -2154,7 +2155,7 @@ pre code {
|
|
|
printPage();
|
|
|
}
|
|
|
if (message.method == "displayInfobar") {
|
|
|
- singlefile.helper.displayIcon(document, true);
|
|
|
+ singlefile.helper.displayIcon(document, true, { openInfobar: message.openInfobar });
|
|
|
const infobarDoc = document.implementation.createHTMLDocument();
|
|
|
infobarDoc.body.appendChild(document.querySelector(singlefile.helper.INFOBAR_TAGNAME));
|
|
|
serializeShadowRoots(infobarDoc.body);
|
|
|
@@ -3111,7 +3112,9 @@ pre code {
|
|
|
});
|
|
|
doc.querySelectorAll("." + MASK_CLASS + ", " + singlefile.helper.INFOBAR_TAGNAME + ", ." + REMOVED_CONTENT_CLASS).forEach(element => element.remove());
|
|
|
if (includeInfobar) {
|
|
|
- singlefile.helper.appendInfobar(doc, singlefile.helper.extractInfobarData(doc));
|
|
|
+ const options = singlefile.helper.extractInfobarData(doc);
|
|
|
+ options.openInfobar = openInfobar;
|
|
|
+ singlefile.helper.appendInfobar(doc, options);
|
|
|
}
|
|
|
doc.querySelectorAll("." + HIGHLIGHT_CLASS).forEach(noteElement => noteElement.classList.remove(HIGHLIGHT_HIDDEN_CLASS));
|
|
|
doc.querySelectorAll(`template[${SHADOWROOT_ATTRIBUTE_NAME}]`).forEach(templateElement => {
|