Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Most printer friendly version of the documentation?

by AltBlue (Chaplain)
on Aug 12, 2008 at 03:31 UTC ( [id://703793]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Most printer friendly version of the documentation?
in thread Most printer friendly version of the documentation?

...by means of a css setting...
...If I could block your top-level posts in Newest Nodes, I would

While current CSS selectors don't yet provide an optimal way of creating such selections, you could inject some JavaScript for that purpose. Here's an example that should do the trick in current Gecko browsers:

function xselect(xpath, root) { var doc = root ? root.ownerDocument : document; var res = []; var qry = doc.evaluate(xpath, root || document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0, len = qry.snapshotLength; i < len; i++) res.push( qry.snapshotItem(i) ); return res; } var pageID = xselect( './/table[@id="titlebar-bottom"]//span[@class="addlinks"]/a[1]/text( +)' )[0]; var pageContent = xselect('.//td[@class="main_content"][1]')[0]; if (pageID == "3628") { // Newest Nodes // ignore posts from these users [ 'Anonymous Monk', 'foo', 'bar' ].forEach(function(monkName) { xselect( './/td[2][starts-with(@class,"node-from-")]/a[text()="' + monkName + '"]/ancestor::tr[1]', pageContent ).forEach(function(row) { row.parentNode.removeChild(row); }); }); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://703793]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2026-04-11 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.