Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hide posts by specific users on yours.org
// ==UserScript==
// @name User Mute List
// @namespace https://github.com/rohenaz
// @version 0.1
// @description Hide posts from specific users
// @author Satchmo
// @match https://www.yours.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// List users here
let muteList = ['username1', 'username2']
let list = document.getElementsByClassName('content-list')[0]
let len = list ? list.childNodes.length : 0
while(len--) {
let post = list.childNodes[len]
let author = post.getElementsByClassName('author-name')[0].innerHTML
if(muteList.includes(author)) {
console.log('found a blocked user!', author)
post.style.display = "none"
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment