diff --git a/js/pgm_construction.js b/js/pgm_construction.js index f872bfcb837242744c8493bb95666e2a8f73b2a8..ed358119dbaf57baf2528d12caf9aef216f8b487 100644 --- a/js/pgm_construction.js +++ b/js/pgm_construction.js @@ -221,6 +221,11 @@ function generate_blob() { /* propose the blob for download : save all data */ function blob_download() { + if(window.MSBlobBuilder) { + var bb = new MSBlobBuilder(); + bb.append(JSON.stringify(localStorage)); + return navigator.msSaveBlob(bb, 'explosurf.json'); + } var link = document.createElement('a') ; link.setAttribute('download', 'explosurf.json') ; link.href = generate_blob() ; @@ -230,7 +235,7 @@ function blob_download() { var event ; if(typeof MouseEvent !== 'function') { event = document.createEvent("MouseEvent"); - event.initMouseEvent("click",true,true,window,0,0,0,0,0,false,false,false,false,0,null); + event.initMouseEvent("click",true,false,window,0,0,0,0,0,false,false,false,false,0,null); } else { event = new MouseEvent('click'); }