Skip to content

Instantly share code, notes, and snippets.

@ninjastic
Created April 1, 2022 18:42
Show Gist options
  • Save ninjastic/580bbe7aeff5eaf0d20c41346587d6e5 to your computer and use it in GitHub Desktop.
Save ninjastic/580bbe7aeff5eaf0d20c41346587d6e5 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Low IQ Filter
// @version 0.1
// @description Filters the wasted space of the forum out
// @author TryNinja
// @match https://bitcointalk.org/index.php?topic=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bitcointalk.org
// @grant none
// ==/UserScript==
(function() {
'use strict';
const MIN_IQ = 160;
const posts = document.querySelectorAll("#quickModForm > table.bordercolor > tbody > tr > td > table");
posts.forEach(post => {
const userIq = post.querySelector("td.poster_info > div > b");
if (!userIq) return null;
const userIqValue = Number(userIq.textContent.match(/IQ: ([0-9]+)/)[1]);
if (userIqValue < MIN_IQ) {
const postContentTd = post.querySelector('td.td_headerandpost');
const postAuthorUsername = post.querySelector('td.poster_info > b > a');
postContentTd.innerHTML = `Post ignored because the author's IQ is too low (imagine having less than ${MIN_IQ} IQ LOL)`;
postAuthorUsername.innerHTML = 'LOW IQ DUMMY!'
userIq.textContent = `${userIq.textContent} 🤣`
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment