diff --git a/packages/shell-chrome/assets/html/screenshot/background.js b/packages/shell-chrome/assets/html/screenshot/background.js index 9e9d428..7eceeac 100644 --- a/packages/shell-chrome/assets/html/screenshot/background.js +++ b/packages/shell-chrome/assets/html/screenshot/background.js @@ -55,7 +55,7 @@ chrome.runtime.onMessage.addListener((req, sender, res) => { console.log("capture结束") res({ message: 'image', image: cropped }) // 回调有问题,参数么有传回去,使用以下变通方式直接转换为可下载的文件 - var link = document.createElement('a'); link.download = "学生助手 屏幕截图 " + Date.now(); link.href = cropped; link.click(); + var link = document.createElement('a'); link.download = "学生助手截图-" + Date.now(); link.href = cropped; link.click(); }) }) }) diff --git a/packages/shell-chrome/assets/html/screenshot/js/content.js b/packages/shell-chrome/assets/html/screenshot/js/content.js index 3e63091..9922c29 100644 --- a/packages/shell-chrome/assets/html/screenshot/js/content.js +++ b/packages/shell-chrome/assets/html/screenshot/js/content.js @@ -62,6 +62,7 @@ var capture = (force) => { message: 'capture', senderId: "screenshot", area: selection, dpr: devicePixelRatio }, (res) => { console.log("capture回调结果:", res) + return // 变通 overlay(false) selection = null save(res.image, config.format, config.save)