mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-16 19:46:19 +02:00
Download files using app approach. Fixes #313.
This is done till chrome.downloads works again.
This commit is contained in:
@@ -44,6 +44,10 @@ function saveScreenshot(dataURI) {
|
|||||||
'/temporary/' +
|
'/temporary/' +
|
||||||
fileName;
|
fileName;
|
||||||
|
|
||||||
|
// HACK: because chrome.downloads isn't working on optional permissions
|
||||||
|
// anymore.
|
||||||
|
return window.open(filePath);
|
||||||
|
|
||||||
chrome.downloads.download(
|
chrome.downloads.download(
|
||||||
{
|
{
|
||||||
url: filePath
|
url: filePath
|
||||||
|
@@ -212,7 +212,7 @@ export function downloadFile(fileName, blob) {
|
|||||||
a.click();
|
a.click();
|
||||||
a.remove();
|
a.remove();
|
||||||
}
|
}
|
||||||
if (window.IS_EXTENSION) {
|
if (false && window.IS_EXTENSION) {
|
||||||
chrome.downloads.download(
|
chrome.downloads.download(
|
||||||
{
|
{
|
||||||
url: window.URL.createObjectURL(blob),
|
url: window.URL.createObjectURL(blob),
|
||||||
|
Reference in New Issue
Block a user