mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add per-character and per-group overrides for external media
This commit is contained in:
@ -255,6 +255,8 @@ let power_user = {
|
||||
auto_connect: false,
|
||||
auto_load_chat: false,
|
||||
forbid_external_images: false,
|
||||
external_media_allowed_overrides: [],
|
||||
external_media_forbidden_overrides: [],
|
||||
};
|
||||
|
||||
let themes = [];
|
||||
@ -2761,22 +2763,35 @@ export function getCustomStoppingStrings(limit = undefined) {
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
const adjustAutocompleteDebounced = debounce(() => {
|
||||
$('.ui-autocomplete-input').each(function () {
|
||||
const isOpen = $(this).autocomplete('widget')[0].style.display !== 'none';
|
||||
if (isOpen) {
|
||||
$(this).autocomplete('search');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(window).on('resize', async () => {
|
||||
if (isMobile()) {
|
||||
return;
|
||||
}
|
||||
|
||||
//console.log('Window resized!');
|
||||
const reportZoomLevelDebounced = debounce(() => {
|
||||
const zoomLevel = Number(window.devicePixelRatio).toFixed(2);
|
||||
const winWidth = window.innerWidth;
|
||||
const winHeight = window.innerHeight;
|
||||
console.debug(`Zoom: ${zoomLevel}, X:${winWidth}, Y:${winHeight}`);
|
||||
});
|
||||
|
||||
$(window).on('resize', async () => {
|
||||
adjustAutocompleteDebounced();
|
||||
setHotswapsDebounced();
|
||||
|
||||
if (isMobile()) {
|
||||
return;
|
||||
}
|
||||
|
||||
reportZoomLevelDebounced();
|
||||
|
||||
if (Object.keys(power_user.movingUIState).length > 0) {
|
||||
resetMovablePanels('resize');
|
||||
}
|
||||
// Adjust layout and styling here
|
||||
setHotswapsDebounced();
|
||||
});
|
||||
|
||||
// Settings that go to settings.json
|
||||
|
Reference in New Issue
Block a user