Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Ignore monks in last hour of cb

by chacham (Prior)
on Apr 29, 2015 at 19:04 UTC ( #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 (Canon) 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
Node Status?
node history
Node Type: monkdiscuss [id://1125162]
Approved by GotToBTru
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-06-18 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (109 votes). Check out past polls.

    Notices?