aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/main.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
index 2d205dd..0a33b42 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -373,7 +373,9 @@ function basename(path) {
}
function dload_btn_on_click(btn, path, pre) {
- var blob = new Blob([pre.text()], {type: 'text/plain'});
+ // The type must be application/octet-stream; if it's text/plain, the
+ // Android Chrome appends the .txt suffix to the downloaded file names.
+ var blob = new Blob([pre.text()], {type: 'application/octet-stream'});
var url = URL.createObjectURL(blob);
var link = $('<a/>');