mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix download/export
This commit is contained in:
parent
d1eacbb574
commit
86cf8f3202
@ -99,7 +99,7 @@ function download(url) {
|
|||||||
url += '?' + Date.now(); // don't use cache
|
url += '?' + Date.now(); // don't use cache
|
||||||
|
|
||||||
if (isElectron()) {
|
if (isElectron()) {
|
||||||
const remote = utils.dynamicRequire('electron').remote;
|
const remote = dynamicRequire('electron').remote;
|
||||||
|
|
||||||
remote.getCurrentWebContents().downloadURL(url);
|
remote.getCurrentWebContents().downloadURL(url);
|
||||||
}
|
}
|
||||||
@ -273,7 +273,7 @@ function isHtmlEmpty(html) {
|
|||||||
|
|
||||||
async function clearBrowserCache() {
|
async function clearBrowserCache() {
|
||||||
if (isElectron()) {
|
if (isElectron()) {
|
||||||
const win = utils.dynamicRequire('electron').remote.getCurrentWindow();
|
const win = dynamicRequire('electron').remote.getCurrentWindow();
|
||||||
await win.webContents.session.clearCache();
|
await win.webContents.session.clearCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user