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 ( #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?
[Eily]: Murphy's law to be precise
LanX Anonymous Monks meeting
holli brings cookies to the meeting
[stonecolddevin]: good morning all
[holli]: I'd bring wine but I am dry since two years, so cookies must do
[1nickt]: james28909 I enjoyed your metaphysical wonderings in tghe scientist thread. Also thought your comment about baby crispr students was comment of the year.
Eily brings the milk

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-12-13 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (373 votes). Check out past polls.

    Notices?