downloadContent takes type as 2nd arg

master
Daniel Berteaud 9 years ago
parent bb9095f6c2
commit 01b18937af
  1. 6
      public/js/vroom.js

@ -194,8 +194,8 @@ function linkify(text){
} }
// Save content to a file // Save content to a file
function downloadContent(filename, content){ function downloadContent(filename, type, content){
var blob = new Blob([content], {type: 'text/html;charset=utf-8'}); var blob = new Blob([content], {type: type});
saveAs(blob, filename); saveAs(blob, filename);
} }
@ -2164,7 +2164,7 @@ function initVroom(room) {
// Download chat history in a file // Download chat history in a file
$('#saveChat').click(function(){ $('#saveChat').click(function(){
var d = new Date; 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 // Suspend/Play MoH

Loading…
Cancel
Save