Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: /msg to [author] of the [node]

by artist (Parson)
on Jun 25, 2003 at 04:46 UTC ( [id://268752]=note: print w/replies, xml ) Need Help??


in reply to Re: /msg to [author] of the [node]
in thread /msg to [author] of the [node]

I mean, when you clink on the link, it will open a new '/msg node' with pre-filled details. In any case I would love to see the bookmarklet that you described.

Debating my own idea, I am not sure that dual interface to the user about the node (answer and the message) would serve the purpose. Intention was to make user specific comments about the node or ask to clarify the user's idea.

artist

Replies are listed 'Best First'.
Re: /msg to [author] of the [node]
by hacker (Priest) on Jun 26, 2003 at 01:01 UTC
    This will get you a good portion of the way there.
    javascript:function htmlEscape(s) { s=s.replace(/&/g,'&amp; s=s.replace(/>/g,'&gt;'); s=s.replace(/</g,'&lt;'); return s; } function linkEscape(s) { s=s.replace(/&/g,'&amp;'); s=s.replace(/"/,'&quot;'); return s } h = '<a href="' + linkEscape(location.href) + '">' + htmlEscape(document.title) + '</a>'; with(window.open().document) { write(h+'<form name=f> <textarea name=a rows=5 cols=80 wrap=hard>' +htmlEscape(h)+'</textarea></form>'); close(); f.a.select(); } void 0;

    I leave it to you to grok the rest of the data out of the page in question, but here's a clue there as well:

    javascript:(function() { var a = { }, b =[], i, e, c, k, d, s = "<table border=1> <thead> <tr><th>#</th> <th>Tag</th> <th>className</th> </tr> </thead>"; for (i = 0; e = document.getElementsByTagName("*")[i]; ++i) if (c = e.className) { k = e.tagName + "." + c; a[k] = a[k] ? a[k] + 1 : 1; } for (k in a) b.push([k, a[k]]); b.sort(); for (i in b) s += "<tr><td>" + b[i][1] + "</td><td>" + b[i][0].split(".").join("</td><td>") + "</td></tr>"; s += "</table>"; d = open().document; d.write(s); d.close();} )

    Be aware of the maximum length of bookmarklets in your browser of course, and make sure to unwrap the code above onto single lines in your bookmarklet entry field. I have purposely wrapped these here to eliminate the possibility of rogue '+' signs appearing in there from PerlMonks wrapping code itself.

    Good luck..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-29 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found