]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/commitdiff
Do not open a new tab for file downloads
authorJohannes Zellner <johannes@cloudron.io>
Fri, 7 Apr 2017 14:51:41 +0000 (16:51 +0200)
committerJohannes Zellner <johannes@cloudron.io>
Fri, 7 Apr 2017 14:51:41 +0000 (16:51 +0200)
frontend/js/app.js

index bf9b5348953abfc6d67effd7ce29394cddffd857..0875f1459e0d820299ab9cb075e91c1ee9256dbd 100644 (file)
@@ -138,7 +138,7 @@ function open(entry) {
 function download(entry) {
     if (entry.isDirectory) return;
 
-    window.open(encode('/api/files/' + sanitize(app.path + '/' + entry.filePath)) + '?access_token=' + localStorage.accessToken);
+    window.location.href = encode('/api/files/' + sanitize(app.path + '/' + entry.filePath)) + '?access_token=' + localStorage.accessToken;
 }
 
 function up() {