Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 chilling in the Monastery: (5)
As of 2024-06-17 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.