Created
January 5, 2023 14:07
-
-
Save Slyyxp/8783092d73ea9f9f0ee2b328c78e9f64 to your computer and use it in GitHub Desktop.
CleanUnreadPosts
This file contains 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 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