From 01b18937af565a3521d368c185478c7f2aef7d2b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 15 Jul 2015 22:14:02 +0200 Subject: [PATCH] downloadContent takes type as 2nd arg --- public/js/vroom.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index d6cbdc1..4cb8b86 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -194,8 +194,8 @@ function linkify(text){ } // Save content to a file -function downloadContent(filename, content){ - var blob = new Blob([content], {type: 'text/html;charset=utf-8'}); +function downloadContent(filename, type, content){ + var blob = new Blob([content], {type: type}); saveAs(blob, filename); } @@ -2164,7 +2164,7 @@ function initVroom(room) { // Download chat history in a file $('#saveChat').click(function(){ var d = new Date; - downloadContent('VROOM Tchat (' + room + ') ' + d.toLocaleString() + '.html', $('#chatHistory').html()); + downloadContent('VROOM Tchat (' + room + ') ' + d.toLocaleString() + '.html', 'text/html;charset=utf-8', $('#chatHistory').html()); }); // Suspend/Play MoH