Yet another GreaseMonkey script: Copy into a file named "braz-ex.user.js" and install as usual. (and replace the part rendered as a link with the plain url). Edit: the DU software is a little too replacement happy - if someone is really interested: PM me.
// ==UserScript==
// @name Braz-ex v.01
// @description Removes the B-Joke from Threads.
// @include http://www.democraticunderground.com/discuss/duboard.php*
// ==/UserScript==
//This is a free script.
/*
Copyright (C) 2006 Kellanved
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
function adaptPost (){
postTops = document.evaluate(
"//table<@class='post-top'>",
document,
null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null);
postMessages = document.evaluate(
"//table<@class='post-message'>",
document,
null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null);
//GM_log(table);
for (j=postTops.snapshotLength-1; j >=0 ; j--) {
message = postMessages.snapshotItem(j);
/*table=postTops.snapshotItem(j);
row = table.getElementsByTagName('tr').item(0);
cell = row.getElementsByTagName('td').item(0);
name = cell.getElementsByTagName('b').item(0);
name = name.childNodes.item(0).nodeValue;*/
text = message.childNodes<1>.childNodes<0>.childNodes<3>.innerHTML;
if (text.toLowerCase().indexOf("brazillion")!=-1) { // &&name.toLowerCase().indexOf("wesley")
message.parentNode.removeChild(message);
alert("likely Brazillian Joke Removed");
}
}
return true;
}
// The Main Program
if (window.location.href.indexOf("az=show_mesg") != -1 || window.location.href.indexOf("az=show_topic&") != -1 || window.location.href.indexOf("az=view_all") != -1 ){
adaptPost();
}