Last active
January 12, 2017 17:17
-
-
Save bendechrai/a846b1fa09c580650712 to your computer and use it in GitHub Desktop.
Mailman Always Discard and Ban (Greasemonkey Script)
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
// ==UserScript== | |
// @name Mailman Always Discard and Ban | |
// @namespace https://bendechrai.com/ | |
// @description Automatically selects "Discard" and ticks the "Add" and Ban" checkboxes on Mailman admin requests for pending messages | |
// @downloadURL TBA | |
// @match *://*/mailman/admindb/* | |
// @match *://*/lists/admindb/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var inputs = document.getElementsByTagName('input'); | |
for (var ptr = 0; ptr < inputs.length; ptr++) { | |
var input = inputs[ptr]; | |
if (input.name.toLowerCase().match(/^senderaction/) && input.value == '3') { | |
input.checked = true; | |
} | |
if (input.name.toLowerCase().match(/^senderfilterp/)) { | |
input.checked = true; | |
} | |
// Uncomment if you want the Ban Sender checkbox ticked too | |
//if (input.name.toLowerCase().match(/^senderbanp/)) { | |
// input.checked = true; | |
//} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment