mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-06 12:47:57 +01:00
More Safari weirdness cope
This commit is contained in:
parent
7883d091be
commit
be518d3668
@ -1,5 +1,9 @@
|
|||||||
/* iPhone copium land */
|
/* iPhone copium land */
|
||||||
.ios .popup .popup-body {
|
body.safari .popup .popup-body:has(.maximized_textarea) {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.safari .popup .popup-body {
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
max-height: 90vh;
|
max-height: 90vh;
|
||||||
max-height: 90svh;
|
max-height: 90svh;
|
||||||
|
@ -725,10 +725,14 @@ export function initRossMods() {
|
|||||||
RA_autoconnect();
|
RA_autoconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
const isAppleDevice = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
const userAgent = getParsedUA();
|
||||||
|
console.debug('User Agent', userAgent);
|
||||||
|
const isMobileSafari = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
||||||
|
const isDesktopSafari = userAgent?.browser?.name === 'Safari' && userAgent?.platform?.type === 'desktop';
|
||||||
|
const isIOS = userAgent?.os?.name === 'iOS';
|
||||||
|
|
||||||
if (getParsedUA()?.os?.name === 'iOS' || isAppleDevice) {
|
if (isIOS || isMobileSafari || isDesktopSafari) {
|
||||||
document.body.classList.add('ios');
|
document.body.classList.add('safari');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#main_api').change(function () {
|
$('#main_api').change(function () {
|
||||||
|
@ -1430,7 +1430,7 @@ jQuery(function () {
|
|||||||
wrapper.classList.add('flexFlowColumn', 'justifyCenter', 'alignitemscenter');
|
wrapper.classList.add('flexFlowColumn', 'justifyCenter', 'alignitemscenter');
|
||||||
const textarea = document.createElement('textarea');
|
const textarea = document.createElement('textarea');
|
||||||
textarea.value = String(bro.val());
|
textarea.value = String(bro.val());
|
||||||
textarea.classList.add('height100p', 'wide100p');
|
textarea.classList.add('height100p', 'wide100p', 'maximized_textarea');
|
||||||
bro.hasClass('monospace') && textarea.classList.add('monospace');
|
bro.hasClass('monospace') && textarea.classList.add('monospace');
|
||||||
textarea.addEventListener('input', function () {
|
textarea.addEventListener('input', function () {
|
||||||
bro.val(textarea.value).trigger('input');
|
bro.val(textarea.value).trigger('input');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user