Stop the #blamehorus...
Plastic Heart
Member
in General Chat
It's so annoying... the activity post is so long. Please stop it
Comments
#Blamewillyfortryingtostarvehorus
I agree I have to scroll down the post just to see other activity posts :p
But instead of scrolling i always "delete" it
(Maybe we could have some type of "spoiler like" activity post)
#blamehorus
LOL
Don't see any harm in removing it. Though i personally don't have any issue with it.
#ForeverBlameHorus
#MouseScrollWheelMakesLifeEasier
It probably could be added to the website's source code on profiles. But that's up to the forum administrators.
Basically it turns this
to this.
The spoiler below has has the JS code.
var comments = document.querySelectorAll("li[id^=Activity_]");
var hideCommentsWhenCommentsReachAbove = 5;
var subComments;
for (var x of comments) {
subComments = x.querySelector("ul").querySelectorAll("li[id^=ActivityComment_]");
if (subComments.length > hideCommentsWhenCommentsReachAbove) {
var liObj = document.createElement("li");
liObj.className = "Item";
liObj.addEventListener("click",showCommentsAll);
liObj.textContent = "Show Previous Comments";
x.querySelector("ul").insertBefore(liObj,x.querySelector("li[id^=ActivityComment_]"));
for (var i = 0; i < subComments.length - hideCommentsWhenCommentsReachAbove; i++) {
subComments[i].className += " Hidden";
}
}
}
function showCommentsAll(e) {
var self = e.target || e.srcElement;
var hiddenNonFilteredComments = self.parentNode.querySelectorAll("li[class$=Hidden]");
for (var x of hiddenNonFilteredComments) {
if (x.id.startsWith("ActivityComment_")) {
x.className = x.className.substring(0,x.className.length - 7);
}
}
self.outerHTML = "";/*Ie doesn't support self.remove(); ;-;*/
};
OUR GOD SHALL NOT DIE
See that "comment" text over there?
Click it.
Result: