diff --git a/web-to-ppt/background.js b/web-to-ppt/background.js index 0658e43..96fec62 100644 --- a/web-to-ppt/background.js +++ b/web-to-ppt/background.js @@ -220,7 +220,7 @@ function arrayBufferToBase64(buffer) { // 消息处理 chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { - // 采集并下载 JSON(兼容旧流程) + // 采集并缓存数据(不下载 JSON,由 popup 直接转化下载 PPTX) if (message?.type === "WEB_TO_PPT_CAPTURE_START") { (async () => { const settings = normalizeSettings(message.options); @@ -229,10 +229,8 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { assertCaptureableTab(tab); const data = await captureCurrentTab(tab, settings); lastCaptureData = data; // 缓存数据 - const filename = await downloadCapture(data); return { ok: true, - filename, actualViewportWidth: data.source?.actualViewportWidth, requestedViewportWidth: data.source?.requestedViewportWidth };