Want to completely hide a comment spammer's posts in the Peakd front-end?
No problem, use this JavaScript snippet and eliminate their weird public abuse-kink from your life ...
Step 1 install the Wild Monkey Chrome extension
Step 2 Add the following script, specifying https://Peakd.com as the page to run the script on
// ==UserScript==
// @name Hide kgakakillerg Comments
// @namespace https://peakd.com/
// @version 1.0
// @description Hide comments by spammer whose id starts with kgakakillerg_
// @match *://*/*
// @run-at document-idle
// ==/UserScript==
(function() {
'use strict';
const selector = '[id^="kgakakillerg_"]';
function hideSpammer(root = document) {
root.querySelectorAll(selector).forEach(el => {
const container = el.closest('article, .comment, .comment-item, .reply') || el.parentElement;
if (container) container.style.display = 'none';
});
}
hideSpammer();
// Watch for dynamically loaded comments
const obs = new MutationObserver(muts => {
for (const m of muts) {
for (const node of m.addedNodes) {
if (node.nodeType === 1) hideSpammer(node);
}
}
});
obs.observe(document.body, { childList: true, subtree: true });
})();
Step 3 activate!
Boom! Never see KKKs whining about downvotes in your comment area again!