Skip to content

Instantly share code, notes, and snippets.

@rmnmjw
Created December 8, 2023 16:04
Show Gist options
  • Save rmnmjw/b670bff8f0d544ff8ee25ce3bd5f7a60 to your computer and use it in GitHub Desktop.
Save rmnmjw/b670bff8f0d544ff8ee25ce3bd5f7a60 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name MailHog QuickDelete
// @namespace Violentmonkey Scripts
// @match http://localhost:8025/
// @grant none
// @version 1.0
// @author -
// @description 5.4.2023, 19:05:12
// ==/UserScript==
const observer = new MutationObserver((/*mutations*/) => {
const el = document.querySelector('[ng-click="deleteAllConfirm()"]');
if (!el) {
return;
}
el.click()
});
observer.observe(document.body, {
childList: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment