mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Allow vertical scroll in import menu
This commit is contained in:
@@ -12257,9 +12257,7 @@ jQuery(async function () {
|
|||||||
|
|
||||||
$(document).on('click', '.external_import_button, #external_import_button', async () => {
|
$(document).on('click', '.external_import_button, #external_import_button', async () => {
|
||||||
const html = await renderTemplateAsync('importCharacters');
|
const html = await renderTemplateAsync('importCharacters');
|
||||||
|
const input = await callGenericPopup(html, POPUP_TYPE.INPUT, '', { allowVerticalScrolling: true, wider: true, okButton: $('#popup_template').attr('popup-button-import'), rows: 4 });
|
||||||
/** @type {string?} */
|
|
||||||
const input = await callGenericPopup(html, POPUP_TYPE.INPUT, '', { wider: true, okButton: $('#popup_template').attr('popup-button-import'), rows: 4 });
|
|
||||||
|
|
||||||
if (!input) {
|
if (!input) {
|
||||||
console.debug('Custom content import cancelled');
|
console.debug('Custom content import cancelled');
|
||||||
@@ -12267,7 +12265,7 @@ jQuery(async function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// break input into one input per line
|
// break input into one input per line
|
||||||
const inputs = input.split('\n').map(x => x.trim()).filter(x => x.length > 0);
|
const inputs = String(input).split('\n').map(x => x.trim()).filter(x => x.length > 0);
|
||||||
|
|
||||||
for (const url of inputs) {
|
for (const url of inputs) {
|
||||||
let request;
|
let request;
|
||||||
|
Reference in New Issue
Block a user