Skip to content

Instantly share code, notes, and snippets.

@rohenaz
Last active August 9, 2018 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohenaz/c923ba2b3473946ee0175540f80ac15e to your computer and use it in GitHub Desktop.
Save rohenaz/c923ba2b3473946ee0175540f80ac15e to your computer and use it in GitHub Desktop.
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