export subtree to tar file

This commit is contained in:
azivner
2018-02-25 10:55:21 -05:00
parent 12c06ae97e
commit 60bba46d80
7 changed files with 83 additions and 50 deletions

View File

@@ -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;
}
}