mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 09:56:36 +01:00
export subtree to tar file
This commit is contained in:
@@ -189,4 +189,20 @@ async function requireCss(url) {
|
||||
if (!css.includes(url)) {
|
||||
$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', url));
|
||||
}
|
||||
}
|
||||
|
||||
function getHost() {
|
||||
const url = new URL(window.location.href);
|
||||
return url.protocol + "//" + url.hostname + ":" + url.port;
|
||||
}
|
||||
|
||||
function download(url) {
|
||||
if (isElectron()) {
|
||||
const remote = require('electron').remote;
|
||||
|
||||
remote.getCurrentWebContents().downloadURL(url);
|
||||
}
|
||||
else {
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user