More Safari weirdness cope
| @@ -1,5 +1,9 @@ | ||
| 1 | 1 | /* iPhone copium land */ |
| 2 | 2 | body.iossafari .popup .popup-body:has(.maximized_textarea) { |
| 3 | + height: 100%; | |
| 4 | +} | |
| 5 | + | |
| 6 | +body.safari .popup .popup-body { | |
| 3 | 7 | height: fit-content; |
| 4 | 8 | max-height: 90vh; |
| 5 | 9 | max-height: 90svh; |
| @@ -725,10 +725,14 @@ export function initRossMods() { | ||
| 725 | 725 | RA_autoconnect(); |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | - const isAppleDevice = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); | |
| 728 | + const userAgent = getParsedUA(); | |
| 729 | - | |
| 729 | + 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 | } |
| 733 | 737 | |
| 734 | 738 | $('#main_api').change(function () { |
| @@ -1430,7 +1430,7 @@ jQuery(function () { | ||
| 1430 | 1430 | wrapper.classList.add('flexFlowColumn', 'justifyCenter', 'alignitemscenter'); |
| 1431 | 1431 | const textarea = document.createElement('textarea'); |
| 1432 | 1432 | textarea.value = String(bro.val()); |
| 1433 | 1433 | textarea.classList.add('height100p', 'wide100p', 'maximized_textarea'); |
| 1434 | 1434 | bro.hasClass('monospace') && textarea.classList.add('monospace'); |
| 1435 | 1435 | textarea.addEventListener('input', function () { |
| 1436 | 1436 | bro.val(textarea.value).trigger('input'); |