fix: 去掉自动下载 JSON,只下载 PPTX
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user