change mimetype to force download
use innerHTML instead of innerText to make it work in FF
update js file