mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-16 20:51:34 +02:00
takeScreenshot: remove debugger
This commit is contained in:
@ -1,6 +1,4 @@
|
|||||||
import {
|
import { handleDownloadsPermission } from './utils';
|
||||||
handleDownloadsPermission
|
|
||||||
} from "./utils";
|
|
||||||
|
|
||||||
function saveScreenshot(dataURI) {
|
function saveScreenshot(dataURI) {
|
||||||
// convert base64 to raw binary data held in a string
|
// convert base64 to raw binary data held in a string
|
||||||
@ -45,7 +43,8 @@ function saveScreenshot(dataURI) {
|
|||||||
'/temporary/' +
|
'/temporary/' +
|
||||||
fileName;
|
fileName;
|
||||||
|
|
||||||
chrome.downloads.download({
|
chrome.downloads.download(
|
||||||
|
{
|
||||||
url: filePath
|
url: filePath
|
||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
@ -68,7 +67,8 @@ function saveScreenshot(dataURI) {
|
|||||||
size,
|
size,
|
||||||
fs => {
|
fs => {
|
||||||
fs.root.getFile(
|
fs.root.getFile(
|
||||||
fileName, {
|
fileName,
|
||||||
|
{
|
||||||
create: true
|
create: true
|
||||||
},
|
},
|
||||||
fileEntry => {
|
fileEntry => {
|
||||||
@ -116,9 +116,9 @@ export function takeScreenshot(boundRect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
debugger
|
|
||||||
chrome.tabs.captureVisibleTab(
|
chrome.tabs.captureVisibleTab(
|
||||||
null, {
|
null,
|
||||||
|
{
|
||||||
format: 'png',
|
format: 'png',
|
||||||
quality: 100
|
quality: 100
|
||||||
},
|
},
|
||||||
@ -135,4 +135,4 @@ export function takeScreenshot(boundRect) {
|
|||||||
|
|
||||||
trackEvent('ui', 'takeScreenshotBtnClick');
|
trackEvent('ui', 'takeScreenshotBtnClick');
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
Reference in New Issue
Block a user