Skip to content

Instantly share code, notes, and snippets.

@vincerubinetti
Last active March 4, 2025 22:27
Show Gist options
  • Save vincerubinetti/1c9a97cccce165a8ff246a98aedce0ba to your computer and use it in GitHub Desktop.
Save vincerubinetti/1c9a97cccce165a8ff246a98aedce0ba to your computer and use it in GitHub Desktop.
Run in dev console to clear all "deploy notifications" in your Netlify site
const sleep = (ms = 0) => new Promise((resolve) => setTimeout(resolve, ms));
const notifications = document.querySelectorAll("[aria-label*='Options']");
for (const notification of notifications) {
notification.click();
await sleep(10);
notification.nextElementSibling
.querySelector("li:nth-child(2) button")
.click();
await sleep(10);
document.querySelector(".modal form button[type='submit']").click();
await sleep(1000);
}
@vincerubinetti
Copy link
Author

vincerubinetti commented Mar 4, 2025

When you create a new Netlify site, it enables a bunch of email and webhook notifications that are annoying (imo) and take a few minutes to clear manually.

Go to app.netlify.com/sites/YOURSITE/configuration/notifications#emails-and-webhooks and run this script in your dev console, and it will automatically clear all of them in a few seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment