]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - frontend/js/app.js
Do not open a new tab for file downloads
[perso/Immae/Projets/Nodejs/Surfer.git] / 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() {