|
@@ -835,14 +835,14 @@ async function addExportMenu() {
|
|
textAreaElem.readOnly = true;
|
|
textAreaElem.readOnly = true;
|
|
const cfgString = JSON.stringify({ formatVersion, data: getFeatures() });
|
|
const cfgString = JSON.stringify({ formatVersion, data: getFeatures() });
|
|
lastUncompressedCfgString = JSON.stringify({ formatVersion, data: getFeatures() }, undefined, 2);
|
|
lastUncompressedCfgString = JSON.stringify({ formatVersion, data: getFeatures() }, undefined, 2);
|
|
- textAreaElem.value = canCompress ? await compress(cfgString, compressionFormat, "base64") : cfgString;
|
|
|
|
|
|
+ textAreaElem.value = canCompress ? await compress(cfgString, compressionFormat, "string") : cfgString;
|
|
|
|
|
|
siteEvents.on("configChanged", async (data) => {
|
|
siteEvents.on("configChanged", async (data) => {
|
|
const textAreaElem = document.querySelector<HTMLTextAreaElement>("#bytm-export-menu-textarea");
|
|
const textAreaElem = document.querySelector<HTMLTextAreaElement>("#bytm-export-menu-textarea");
|
|
const cfgString = JSON.stringify({ formatVersion, data });
|
|
const cfgString = JSON.stringify({ formatVersion, data });
|
|
lastUncompressedCfgString = JSON.stringify({ formatVersion, data }, undefined, 2);
|
|
lastUncompressedCfgString = JSON.stringify({ formatVersion, data }, undefined, 2);
|
|
if(textAreaElem)
|
|
if(textAreaElem)
|
|
- textAreaElem.value = canCompress ? await compress(cfgString, compressionFormat, "base64") : cfgString;
|
|
|
|
|
|
+ textAreaElem.value = canCompress ? await compress(cfgString, compressionFormat, "string") : cfgString;
|
|
});
|
|
});
|
|
|
|
|
|
//#SECTION footer
|
|
//#SECTION footer
|
|
@@ -1037,7 +1037,7 @@ async function addImportMenu() {
|
|
}
|
|
}
|
|
catch {
|
|
catch {
|
|
try {
|
|
try {
|
|
- return JSON.parse(await decompress(input, compressionFormat, "base64"));
|
|
|
|
|
|
+ return JSON.parse(await decompress(input, compressionFormat, "string"));
|
|
}
|
|
}
|
|
catch(err) {
|
|
catch(err) {
|
|
warn("Couldn't import configuration:", err);
|
|
warn("Couldn't import configuration:", err);
|