mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-23 07:51:18 +01:00
Change the naming rule of regex exporting
This commit is contained in:
parent
212e61d2a1
commit
a96e1903a3
@ -94,7 +94,7 @@ async function loadRegexScripts() {
|
|||||||
await onRegexEditorOpenClick(scriptHtml.attr('id'));
|
await onRegexEditorOpenClick(scriptHtml.attr('id'));
|
||||||
});
|
});
|
||||||
scriptHtml.find('.export_regex').on('click', async function () {
|
scriptHtml.find('.export_regex').on('click', async function () {
|
||||||
const fileName = `${script.scriptName.replace(/[^a-z0-9]/gi, '_').toLowerCase()}.json`;
|
const fileName = `${script.scriptName.replace(/[\s.<>:"/\\|?*\x00-\x1F\x7F]/g, '_').toLowerCase()}.json`;
|
||||||
const fileData = JSON.stringify(script, null, 4);
|
const fileData = JSON.stringify(script, null, 4);
|
||||||
download(fileData, fileName, 'application/json');
|
download(fileData, fileName, 'application/json');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user