Skip to content

Instantly share code, notes, and snippets.

@youdie323323
Last active June 23, 2025 14:34
Show Gist options
  • Save youdie323323/9b278d45efa0c93490262369985b52d8 to your computer and use it in GitHub Desktop.
Save youdie323323/9b278d45efa0c93490262369985b52d8 to your computer and use it in GitHub Desktop.
Detect adguard without fetching blocked link
for (const toStringProperty of Object.getOwnPropertyNames(Window.prototype.toString || window.__proto__.toString)) {
if (toStringProperty !== "length" && toStringProperty !== "name") {
console.log("Adguard detected");
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment