Created
March 12, 2025 10:03
-
-
Save sulincix/73bc96f392a4295cfc33dc554e456bb6 to your computer and use it in GitHub Desktop.
Apple Blocker for Websites
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
// Apple garbage blocker | |
function isApple() { | |
return /iPhone/i.test(navigator.userAgent) | |
|| /Macintosh/i.test(navigator.userAgent) | |
|| /Mac OS X/i.test(navigator.userAgent) | |
|| /iPad/i.test(navigator.userAgent); | |
} | |
if(isApple()){ | |
document.body.innerHTML = "<h1 style='background: black; color:white;'>Apple Devices Are Not Allowed!</h1>" | |
document.body.innerHTML += "<p style='background: black; color:white;'>Get a real device: use Android or GNU/Linux!</p>"; | |
throw new Error("Apple Detected!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment