mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Allow multiple import of regex
This commit is contained in:
@ -14,7 +14,7 @@
|
|||||||
<i class="fa-solid fa-file-import"></i>
|
<i class="fa-solid fa-file-import"></i>
|
||||||
<span data-i18n="ext_regex_import_script">Import Script</span>
|
<span data-i18n="ext_regex_import_script">Import Script</span>
|
||||||
</div>
|
</div>
|
||||||
<input type="file" id="import_regex_file" hidden accept="*.json" />
|
<input type="file" id="import_regex_file" hidden accept="*.json" multiple />
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<label data-i18n="ext_regex_saved_scripts">Saved Scripts</label>
|
<label data-i18n="ext_regex_saved_scripts">Saved Scripts</label>
|
||||||
|
@ -325,7 +325,9 @@ jQuery(async () => {
|
|||||||
});
|
});
|
||||||
$('#import_regex_file').on('change', async function () {
|
$('#import_regex_file').on('change', async function () {
|
||||||
const inputElement = this instanceof HTMLInputElement && this;
|
const inputElement = this instanceof HTMLInputElement && this;
|
||||||
await onRegexImportFileChange(inputElement.files[0]);
|
for (const file of inputElement.files) {
|
||||||
|
await onRegexImportFileChange(file);
|
||||||
|
}
|
||||||
inputElement.value = '';
|
inputElement.value = '';
|
||||||
});
|
});
|
||||||
$('#import_regex').on('click', function () {
|
$('#import_regex').on('click', function () {
|
||||||
|
Reference in New Issue
Block a user