Skip to content

Instantly share code, notes, and snippets.

@juvian
Created September 2, 2021 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juvian/fd068370548b8e912b0d930e9cbf87bf to your computer and use it in GitHub Desktop.
Save juvian/fd068370548b8e912b0d930e9cbf87bf to your computer and use it in GitHub Desktop.
Neopets delete read emails
// ==UserScript==
// @name Delete read
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
// @author You
// @match ://www.neopets.com/neomessages.phtml*
// @grant none
// ==/UserScript==
(function() {
var btn = $("<a href='#'><b>Delete read</b></a>").click(function(){
$("input[name='checkbox_arr[]']").each(function(){
$(this).prop('checked', $(this).parent().siblings().last().text() == 'Read');
});
$("option[value='Delete Messages']").parent().val('Delete Messages');
$("form[action='modify_neomessages.phtml']").submit();
return false;
})
$("a[href='/listgreetings.phtml']").parent().append('| ').append(btn);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment