More Safari weirdness cope

be518d3668751edf2a9f676a5ce08f3bc9874bb3

Cohee <18619528+Cohee1207@users.noreply.github.com>

3 files changed, +14 -6Showing whitespace changes
public/css/popup-safari-fix.css+5 -1
@@ -1,5 +1,9 @@
1/* iPhone copium land */1/* iPhone copium land */
2.ios .popup .popup-body {2body.safari .popup .popup-body:has(.maximized_textarea) {
3 height: 100%;
4}
5
6body.safari .popup .popup-body {
3 height: fit-content;7 height: fit-content;
4 max-height: 90vh;8 max-height: 90vh;
5 max-height: 90svh;9 max-height: 90svh;
public/scripts/RossAscends-mods.js+8 -4
@@ -725,10 +725,14 @@ export function initRossMods() {
725 RA_autoconnect();725 RA_autoconnect();
726 }726 }
727727
728 const isAppleDevice = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);728 const userAgent = getParsedUA();
729729 console.debug('User Agent', userAgent);
730 if (getParsedUA()?.os?.name === 'iOS' || isAppleDevice) {730 const isMobileSafari = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
731 document.body.classList.add('ios');731 const isDesktopSafari = userAgent?.browser?.name === 'Safari' && userAgent?.platform?.type === 'desktop';
732 const isIOS = userAgent?.os?.name === 'iOS';
733
734 if (isIOS || isMobileSafari || isDesktopSafari) {
735 document.body.classList.add('safari');
732 }736 }
733737
734 $('#main_api').change(function () {738 $('#main_api').change(function () {
public/scripts/chats.js+1 -1
@@ -1430,7 +1430,7 @@ jQuery(function () {
1430 wrapper.classList.add('flexFlowColumn', 'justifyCenter', 'alignitemscenter');1430 wrapper.classList.add('flexFlowColumn', 'justifyCenter', 'alignitemscenter');
1431 const textarea = document.createElement('textarea');1431 const textarea = document.createElement('textarea');
1432 textarea.value = String(bro.val());1432 textarea.value = String(bro.val());
1433 textarea.classList.add('height100p', 'wide100p');1433 textarea.classList.add('height100p', 'wide100p', 'maximized_textarea');
1434 bro.hasClass('monospace') && textarea.classList.add('monospace');1434 bro.hasClass('monospace') && textarea.classList.add('monospace');
1435 textarea.addEventListener('input', function () {1435 textarea.addEventListener('input', function () {
1436 bro.val(textarea.value).trigger('input');1436 bro.val(textarea.value).trigger('input');