mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'SillyTavern:staging' into staging
This commit is contained in:
@@ -380,6 +380,7 @@ export async function favsToHotswap() {
|
||||
thisHotSwapSlot.attr('grid', isGroup ? grid : '');
|
||||
thisHotSwapSlot.attr('chid', isCharacter ? chid : '');
|
||||
thisHotSwapSlot.data('id', isGroup ? grid : chid);
|
||||
thisHotSwapSlot.attr('title', '');
|
||||
|
||||
if (isGroup) {
|
||||
const group = groups.find(x => x.id === grid);
|
||||
|
@@ -2,6 +2,6 @@
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
#rm_print_characters_block .wide100pLess70px {
|
||||
#rm_print_characters_block.bulk_select .wide100pLess70px {
|
||||
width: calc(100% - 85px);
|
||||
}
|
||||
|
@@ -99,11 +99,17 @@ function selectPreset(name) {
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
function formatTextGenURL(value) {
|
||||
function formatTextGenURL(value, use_mancer) {
|
||||
try {
|
||||
const url = new URL(value);
|
||||
if (!power_user.relaxed_api_urls) {
|
||||
url.pathname = '/api';
|
||||
if (use_mancer) { // If Mancer is in use, only require the URL to *end* with `/api`.
|
||||
if (!url.pathname.endsWith('/api')) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
url.pathname = '/api';
|
||||
}
|
||||
}
|
||||
return url.toString();
|
||||
} catch { } // Just using URL as a validation check
|
||||
|
@@ -4,6 +4,10 @@ export function onlyUnique(value, index, array) {
|
||||
return array.indexOf(value) === index;
|
||||
}
|
||||
|
||||
export function isDigitsOnly(str) {
|
||||
return /^\d+$/.test(str);
|
||||
}
|
||||
|
||||
export function shuffle(array) {
|
||||
let currentIndex = array.length,
|
||||
randomIndex;
|
||||
|
Reference in New Issue
Block a user