Prechádzať zdrojové kódy

add missing properties (fix #1259)

Gildas 2 rokov pred
rodič
commit
86b5912643
2 zmenil súbory, kde vykonal 10 pridanie a 3 odobranie
  1. 8 1
      src/core/bg/downloads.js
  2. 2 2
      src/core/bg/editor.js

+ 8 - 1
src/core/bg/downloads.js

@@ -250,7 +250,14 @@ async function downloadCompressedContent(message, tab) {
 		});
 		if (message.openEditor) {
 			ui.onEdit(tabId);
-			await editor.open({ tabIndex: tab.index + 1, filename: message.filename, content: Array.from(new Uint8Array(await blob.arrayBuffer())), compressContent: true });
+			await editor.open({
+				tabIndex: tab.index + 1,
+				filename: message.filename,
+				content: Array.from(new Uint8Array(await blob.arrayBuffer())),
+				compressContent: message.compressContent,
+				selfExtractingArchive: message.selfExtractingArchive,
+				extractDataFromPage: message.extractDataFromPage
+			});
 		} else if (message.foregroundSave) {
 			await downloadPageForeground(message.taskId, message.filename, blob, tabId, message.foregroundSave);
 		} else {

+ 2 - 2
src/core/bg/editor.js

@@ -39,13 +39,13 @@ export {
 	EDITOR_URL
 };
 
-async function open({ tabIndex, content, filename, compressContent }) {
+async function open({ tabIndex, content, filename, compressContent, selfExtractingArchive, extractDataFromPage }) {
 	const createTabProperties = { active: true, url: EDITOR_PAGE_URL };
 	if (tabIndex != null) {
 		createTabProperties.index = tabIndex;
 	}
 	const tab = await browser.tabs.create(createTabProperties);
-	tabsData.set(tab.id, { content, filename, compressContent });
+	tabsData.set(tab.id, { content, filename, compressContent, selfExtractingArchive, extractDataFromPage });
 }
 
 function onTabRemoved(tabId) {