Last active
March 4, 2025 22:27
-
-
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
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
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.