mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-04-13 07:17:12 +03:00
parent
9c8db2546e
commit
05c764e486
@ -63,7 +63,13 @@ var DOM = (function(){
|
||||
* Triggers a UTF-8 text file download.
|
||||
*/
|
||||
downloadTextFile: (fileName, fileContents) => {
|
||||
var url = window.URL.createObjectURL(new Blob([fileContents], { "type": "octet/stream" }));
|
||||
var blob = new Blob([fileContents], { "type": "octet/stream" });
|
||||
|
||||
if (window.navigator.msSaveBlob){
|
||||
return window.navigator.msSaveBlob(blob, fileName);
|
||||
}
|
||||
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
|
||||
var ele = createElement("a", document.body);
|
||||
ele.href = url;
|
||||
|
Loading…
x
Reference in New Issue
Block a user