Created
December 5, 2024 20:50
-
-
Save apsolut/3768d9e3aebdca37ff2d75d1c85aeb1c to your computer and use it in GitHub Desktop.
ios14 less than 1%
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const uaIOS14 = navigator.userAgent; | |
if ( | |
/iPhone/.test(uaIOS14) && | |
/OS 14_/.test(uaIOS14) && // Specifically checks for iOS 14.x | |
!/OS 14_/.test(uaIOS14) // Excludes iOS 15+ and newer | |
) { | |
console.log('iOS 14'); | |
document.querySelector('#hs-banner-parent #hs-eu-cookie-confirmation') | |
.style.cssText = ` | |
inset: unset; | |
top: 32px; | |
left: 50%; | |
right: 0; | |
transform: translateX(-50%); | |
`; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment