mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
[MIRROR] Port of the iframe storage for settings (#12040)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1b99ac2969
commit
ba5019bd9d
@@ -29,6 +29,7 @@
|
||||
|
||||
// Expose inlined metadata
|
||||
Byond.windowId = parseMetaTag('tgui:windowId');
|
||||
Byond.storageCdn = parseMetaTag('tgui:storagecdn');
|
||||
|
||||
// Backwards compatibility
|
||||
window.__windowId__ = Byond.windowId;
|
||||
@@ -397,32 +398,17 @@
|
||||
],
|
||||
};
|
||||
|
||||
try {
|
||||
window
|
||||
.showSaveFilePicker(opts)
|
||||
.then((fileHandle) => {
|
||||
fileHandle
|
||||
.createWritable()
|
||||
.then((writeableFileHandle) => {
|
||||
writeableFileHandle
|
||||
.write(blob)
|
||||
.then(() => {
|
||||
writeableFileHandle.close();
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
window
|
||||
.showSaveFilePicker(opts)
|
||||
.then(function (file) {
|
||||
return file.createWritable();
|
||||
})
|
||||
.then(function (file) {
|
||||
return file.write(blob).then(function () {
|
||||
return file.close();
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
})
|
||||
.catch(function () {});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user