Skip to content

Instantly share code, notes, and snippets.

@sulincix
Created March 12, 2025 10:03
Show Gist options
  • Save sulincix/73bc96f392a4295cfc33dc554e456bb6 to your computer and use it in GitHub Desktop.
Save sulincix/73bc96f392a4295cfc33dc554e456bb6 to your computer and use it in GitHub Desktop.
Apple Blocker for Websites
// 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