Off Topic > Off Topic

My Little Pony: Friendship for Blockheads: General V2

Pages: << < (18088/34068) > >>

masterockets:


--- Quote from: CityRPG on January 19, 2012, 01:23:51 PM ---Last post was by me, and is a new script.

--- End quote ---
Now if only you could create a script to get tony to stop posting here

Aphtonites:

You know, it really is funny that while you tell people to simply ignore anything related to MLP on the forum, you have to make a script that automatically hides Tony's posts.

CityRPG:


--- Quote from: Aphtonites on January 19, 2012, 01:25:27 PM ---You know, it really is funny that while you tell people to simply ignore anything related to MLP on the forum, you have to make a script that automatically hides Tony's posts.

--- End quote ---
Hey Aphtonites.

Here's one for you.

EDIT: Bug fixed. Should work now.


--- Code: ---// ==UserScript==
// @name         Ignore Pony Topics
// @version      0.1.1
// @description  Ignore Pony topics, too.
// @include      http://forum.blockland.us/index.php?board=*
// @copyright    2012+ Iban
// ==/UserScript==

var tables = document.getElementsByTagName('table'), matchClass = "bordercolor", badRows = new Array();

for(var i = 0; tables.length; i++)
{
if((" "+tables[i].className+" ").indexOf(" "+matchClass+" ") > -1) {
var rows = tables[i].getElementsByTagName('tr');

for(var j = 0; j < rows.length; j++) {
var cells = rows[j].getElementsByTagName('td');

if(cells[1].innerHTML.search(/pony/i) > -1) {
badRows.push(rows[j]);
}
}

// Google Chrome intelligently places a <tbody> in the <table>.
// However, the original SMF code does not have the <tbody>
// Cover our ass.

var tbody = tables[i].getElementsByTagName('tbody');

for(var k = 0; k < badRows.length; k++) {
if(tbody.length) {
tbody[0].removeChild(badRows[k]);
}

// No <tbody>, remove straight from the <table>
else {
tables[i].removeChild(badRows[k]);
}
}

break;
}
}
--- End code ---


Blastdown:

The best of both worlds, everyone wins?



--- Quote from: CityRPG on January 19, 2012, 01:23:15 PM ---If you want, I'll work on the original so that it's a bit smarter about what it removes.

--- End quote ---

I'm probably the only one who would want you to do so, and if you do my suggestions are back a page.

FireFish:

I like the remove LT script.

Pages: << < (18088/34068) > >>

Go to full version