hide --- torrents on mininova help please

Subscribe to hide --- torrents on mininova help please 1 post, 1 voice

 
zaphodz User

Hi there.

I'm using the Mininova Plus script: http://userscripts.org/scripts/show/5978 and wanted to hide mininova.org torrents listed as "---" seeders.

I'm no coder but this it what I've modified:

//FIND TORRENTS WITH --- SEEDS AND HIDE THEM

//Find All --- Seed Torrents
var badText = '---';
var all_pt, thisElement;
all_pt = document.evaluate(
'//td[text()="'+badText+'"]',
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < all_pt.snapshotLength; i++) {
//allDivs.snapshotItem(i).parentNode.parentNode.style.display = 'none';
var el = all_pt.snapshotItem(i).parentNode.parentNode;
el.style.display = 'none';
}

////////////////////////////////////////

//Create Link To Switch Hide/Show --- Seed Torrents

var showhide = document.createElement("li");
var a = document.createElement('a');
a.appendChild(document.createTextNode("Show/Hide " + all_pt.snapshotLength + " --- Seeds"));
a.style.cursor = "pointer";
a.addEventListener('click', function() {

var allElements, thisElement;
allElements = document.evaluate(
'//td[text()="'+badText+'"]',
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allElements.snapshotLength; i++) {
//allDivs.snapshotItem(i).parentNode.parentNode.style.display = 'none';
var el = allElements.snapshotItem(i).parentNode.parentNode;
if ( el.style.display != 'none' ) {
el.style.display = 'none';
} else {
el.style.display = '';
//el.style.border = '2px solid #FF9900';
//el.style.border = '2px solid #FFAB2D';
el.style.backgroundColor = '#FFAB2D';
el.style.fontWeight = 'bold';
}
}
}
, true);

showhide.appendChild(a);
list.appendChild(showhide);

////////////////////////////////////////

The trouble is this code hides all the torrents and only leaves subcategory headings left.

Can anyone point me in the correct method of hiding torrents labelled as "---" seeders please? Any help would be greatly appreciated.

By the way, I came up with a method of hiding torrents less than 10 using this code if anyone is interested.

var allDivs, thisDiv;
allDivs = document.evaluate(
"//span[@class='g'][. < 10]",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);