Skip to content

Instantly share code, notes, and snippets.

@Slyyxp
Created January 5, 2023 14:07
Show Gist options
  • Save Slyyxp/8783092d73ea9f9f0ee2b328c78e9f64 to your computer and use it in GitHub Desktop.
Save Slyyxp/8783092d73ea9f9f0ee2b328c78e9f64 to your computer and use it in GitHub Desktop.
CleanUnreadPosts
// ==UserScript==
// @name CleanUnreadPosts
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Delete Upload Bot messages in unread posts
// @author Slyyxp
// @match https://jpopsuki.eu/forums.php?action=viewunread
// @match http://jpopsuki.eu/forums.php?action=viewunread
// @icon https://www.google.com/s2/favicons?sz=64&domain=jpopsuki.eu
// @grant none
// ==/UserScript==
(function() {
'use strict';
var table = document.querySelector("table");
for (var i = 0, row; row = table.rows[i]; i++) {
//iterate through rows
for (var j = 0, col; col = row.cells[j]; j++) {
//iterate through columns
if (j == 0) { //first column in row
var href = row.querySelector('a');
if (href != null) { //table header returns null because no href there
if (href.innerHTML == "Upload Bot") {
row.remove();
}
}
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment