// ==UserScript==
// @name NamePros Post Filter (by max ID)
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Hides posts from members with an ID greater than or equal to a specified number.
// @author Timothy
// @match https://www.namepros.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Set the maximum member ID to display. All posts with this ID or higher will be hidden.
const maxId = 1012797;
// Select all post containers on the page
const posts = document.querySelectorAll('article.message--post');
// Loop through each post and find the author's ID
posts.forEach(post => {
const userIdElement = post.querySelector('a[data-user-id]');
// Ensure the element with the user ID exists before proceeding
if (userIdElement) {
const authorId = parseInt(userIdElement.getAttribute('data-user-id'), 10);
// If the author ID is greater than or equal to the maximum, hide the entire post
if (authorId >= maxId) {
post.style.display = 'none';
}
}
});
})();