Last active
August 9, 2018 16:00
-
-
Save rohenaz/c923ba2b3473946ee0175540f80ac15e to your computer and use it in GitHub Desktop.
Hide posts by specific users on yours.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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