Skip to content

Instantly share code, notes, and snippets.

@apsolut
Created December 5, 2024 20:50
Show Gist options
  • Save apsolut/3768d9e3aebdca37ff2d75d1c85aeb1c to your computer and use it in GitHub Desktop.
Save apsolut/3768d9e3aebdca37ff2d75d1c85aeb1c to your computer and use it in GitHub Desktop.
ios14 less than 1%
<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