1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-14 02:26:20 +02:00

Download files using app approach. Fixes #313.

This is done till chrome.downloads works again.
This commit is contained in:
Kushagra Gour
2018-07-31 00:50:49 +05:30
parent f9fbc7cd7a
commit 679df53c2a
2 changed files with 5 additions and 1 deletions

View File

@ -44,6 +44,10 @@ function saveScreenshot(dataURI) {
'/temporary/' +
fileName;
// HACK: because chrome.downloads isn't working on optional permissions
// anymore.
return window.open(filePath);
chrome.downloads.download(
{
url: filePath