Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Ignore monks in last hour of cb

by chacham (Prior)
on Apr 29, 2015 at 19:04 UTC ( [id://1125162]=monkdiscuss: print w/replies, xml ) Need Help??

Ignored Users only works for the displayed CB. last hour of cb goes unfettered, but maybe the following Greasemonkey script can help with that.

TMTOWTDI. The first /* commented out */ method uses <del> to strike the names and texts. The second deletes the rows entirely.

The included script ignores paco and NodeReaper, two notorious monks that just say the oddest things. Kudos to Tanktalus for the history itself.

Disclaimer: I mostly googled this one together.

// ==UserScript== // @name cb history Ignore // @namespace http://www.example.com/chacham/ // @description strikeout of remove ignored users from last hour of cb // @include http://perlmonks.org/?node_id=596792 // @grant none // ==/UserScript== var ignore = ['paco' , 'NodeReaper']; /* // encapsulate in <del> var author = document.getElementsByClassName('cb_author'); for (var i = 0; i < author.length; i++) for (var j in ignore) if (author[i].children[0].text == ignore[j]) { author[i].innerHTML = '<del>' + author[i].innerHTML + '</del>'; author[i].parentElement.parentElement.children[1].innerHTML = '<del +>' + author[i].parentElement.parentElement.children[1].innerHTML + '< +/del>'; } */ // remove rows var table = document.getElementsByClassName('cb_author')[0].parentElem +ent.parentElement.parentElement.parentElement; for (var i = (table.rows.length -1) ; i >= 0; i--) if(ignore.indexOf(table.rows[i].cells[0].children[1].children[0].text +) != -1) table.deleteRow(i);

UPDATE: ambrus's comment below seems far superior.

Replies are listed 'Best First'.
Re: Ignore monks in last hour of cb
by ambrus (Abbot) on Apr 29, 2015 at 19:28 UTC

    Rather than using javascript, wouldn't it be easier to use a user CSS rule in your Display Settings for this, such as .chatfrom_52855 { display: none; }? That would hide the chatter everywhere, such as in the chatterbox nodelet, fullpage chat, and last hour of cb. If you want to be more specific, you can make it #id-596792 .chatfrom_52855 { display: none; } to hide it only in last hour of cb.

      How does that ignore specific monks?

        Chat from Corion will have the class chatfrom_5348 class.

Re: Ignore monks in last hour of cb
by jdporter (Paladin) on Apr 30, 2015 at 04:58 UTC
    Kudos to Tanktalus for the history itself.

    Yehhsssss....

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://1125162]
Approved by GotToBTru
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-03-29 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found