Mininova Plus

By Cody J. Benner Last update Jul 4, 2007 — Installed 6,032 times.

Add link for detail page

in
Subscribe to Add link for detail page 1 post, 1 voice

1nfected Scriptwright

Hi Cody.

Thank you so much for this script. it very handy & works like a charm.

I was trying to add a link to the detail page for each search result. But the result isn't favourable.
I'm only able to append it to the end, which looks weird.
What i'd like to is insert it between the download link & the description link.

I'm unable to achieve this & have given up after several attempts. I'd be glad if you could help me out here.
the following is what i have until now.

var all_pt = document.evaluate(
		"//a[contains(@href,'/get/')]",
		document,
		null,
		XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
		null);
for (var i = 0; i < all_pt.snapshotLength; i++) {
		var el = all_pt.snapshotItem(i);
		var id = el.href.substr(el.href.lastIndexOf('/')+1);
		var imge = document.createElement('img');
		imge.src = "/images/down.gif";
		imge.class = "ti";
		imge.style.float = "left";
		imge.style.margin = ".3em";
		var ae = document.createElement('a');
		ae.href = "/det/" + id;
		ae.appendChild(imge);
		el.parentNode.appendChild(ae);
}

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel