Skip to content

Instantly share code, notes, and snippets.

@rooftopchicken
Last active September 19, 2016 03:31
Show Gist options
  • Select an option

  • Save rooftopchicken/d86f6de635c2c64ccae2273f8c37d183 to your computer and use it in GitHub Desktop.

Select an option

Save rooftopchicken/d86f6de635c2c64ccae2273f8c37d183 to your computer and use it in GitHub Desktop.
Hides "____" has been hidden messages on FurVilla. (http://www.furvilla.com/forums/thread/24812)
// ==UserScript==
// @name FV - Content Hider
// @author msjanny #7302
// @description Hides "____" has been hidden messages
// @match http://www.furvilla.com/*
// @version 1.0.2
// ==/UserScript==
(function() {
var url = window.location;
var i;
var x;
var removeEl;
var containerEl;
// villager profiles
if (url.toString().indexOf('http://www.furvilla.com/villager/') >= 0) {
x = document.getElementsByClassName('user-comment');
for (i = 0; i < x.length; i++) {
if (x[i].textContent.trim() === 'Comment has been hidden') {
removeEl = x[i];
containerEl = removeEl.parentNode;
containerEl.removeChild(removeEl);
i--;
}
}
}
// user profiles
else if (url.toString().indexOf('http://www.furvilla.com/profile/') >= 0) {
x = document.getElementsByClassName('user-comment');
for (i = 0; i < x.length; i++) {
if (x[i].textContent.trim().indexOf('Comment has been hidden') === 0) {
removeEl = x[i].parentNode;
containerEl = removeEl.parentNode;
containerEl.removeChild(removeEl);
i--;
}
}
}
// forum posts
else if (url.toString().indexOf('http://www.furvilla.com/forums/thread/') === 0) {
x = document.getElementsByClassName('thread-post');
for (i = 0; i < x.length; i++) {
if (x[i].textContent.trim() === 'Post has been hidden.') {
removeEl = x[i];
containerEl = removeEl.parentNode;
containerEl.removeChild(removeEl);
i--;
}
}
}
// forum threads
else if (url.toString().indexOf('http://www.furvilla.com/forums/') === 0) {
x = document.getElementsByTagName('tr');
for (i = 0; i < x.length; i++) {
if (x[i].textContent.trim() === 'Thread has been hidden.') {
removeEl = x[i];
containerEl = removeEl.parentNode;
containerEl.removeChild(removeEl);
i--;
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment