Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

Make7

(8,543 posts)
Mon Sep 2, 2013, 09:13 PM Sep 2013

Ignore Threads by Author

I miss the DU2 Ignore feature where we could ignore just the threads started by certain people - so much so that during a particularly bad exit meltdown a while back (which included that person starting a ridiculous number of threads) I took a little time to write a GreaseMonkey script to ignore threads by author. I believe I posted this javascript in Meta back then, but since that forum is no more I thought I should post it here for anyone that might be interested.

How you implement this depends on your browser - there are user script add-ons for many of them (e.g. GreaseMonkey for FireFox, TamperMonkey for Chrome, etc.) - the excerpt below contains just the javascript code, you'll have to set up the headers for which domains/pages it will run in, etc.

The only things you'll need to edit are the arrays containing the names of the people whose threads you wish to hide and the list of forums/groups where you don't want threads hidden at all. Simply follow the syntax of what is already there. For example, the three forums listed where I have disabled this function are: Ask the Administrators (1259), Welcome & Help (1256), and Computer Help and Support (1095). Just add (or delete) the forum/group number as a string.

[div class="excerpt" style="display:inline-block; margin-left:1em; border:1px solid #bfbfbf; border-radius:0.4615em; box-shadow:-1px -1px 3px #999999 inset;"]// LIST OF WHOSE THREADS TO HIDE
var ign=new Array("Skinner","EarlG","Elad&quot ;

// LIST OF FORUMS WHERE HIDING IS DISABLED
var frm=new Array("1259","1256","1095&quot

// HIDE THREADS IN FORUM LISTINGS
if (location.search.substring(0,14)=='?com=forum&id=') {

[div style="display:inline-block; margin-left:2em;"]if(frm.indexOf(location.search.substring(14,18))==-1) {

[div style="display:inline-block; margin-left:2em;"]lst=document.getElementsByClassName("author&quot ;

for(i=0;i<lst.length;i++) {

[div style="display:inline-block; margin-left:2em;"]try {
[div style="display:inline-block; margin-left:2em;"]lmt=lst[i];
ath=lmt.getElementsByTagName("a&quot [0].innerHTML;

if(ign.indexOf(ath)!=-1) {

[div style="display:inline-block; margin-left:2em;"]lmt.parentNode.parentNode.removeChild(lmt.parentNode);
}
}
catch(err) {
}
}
}
}
// HIDE THREADS ON LATEST AND GREATEST PAGES
else if ((location.search.substring(0,19)=='?com=latest_threads')||(location.search.substring(0,21)=='?com=greatest_threads')) {

[div style="display:inline-block; margin-left:2em;"]lst=document.getElementsByClassName("thread-info&quot ;

for(i=0;i<lst.length;i++) {

[div style="display:inline-block; margin-left:2em;"]try {
[div style="display:inline-block; margin-left:2em;"]lmt=lst[i];
ath=lmt.innerHTML;

if(ign.indexOf(ath)!=-1) {

[div style="display:inline-block; margin-left:2em;"]lmt.parentNode.parentNode.removeChild(lmt.parentNode);
}
}
catch(err) {
}
}
}

Latest Discussions»Help & Search»DU Community Help»Ignore Threads by Author