Title: Re: JavaScript
On 7/10/2003 10:06 PM, John Holt deftly typed out:

> I seem to recall someone recently discussing a _javascript_ that when dragged
> into Safari's toolbar creates a button which when clicked opens your default
> email client and inserts the URL that you are currently viewing.
> Could someone please direct me to this script, that is if I'm not
> dreaming.!!
> I am aware of a Applescript that gets a URL from Safari, however I prefer
> the one that I have described above.
> Please forgive me if I am confusing this list with another.

I modified this one, that I snagged from MacFixIt:

_javascript_:location.href=''+document.title+'&BODY='+document.title+'%5Cr%3C'+escape(location.href)+'%3E'

It inserts the page title followed by the URL in <> brackets. It differs from MacFixIt's version in that theirs has:

+document.title+'%5Cn%3C'+

(Notice the "%5Cn" instead of the "%5Cr" in mine)

Theirs apparently defines the line break as a Unix newline as opposed to the Macintosh carriage return. This apparently works for Apple's Mail.app, but it does not work for Entourage, hence my modification. The carriage return version should work with all Mac email clients.

-Remo Del Bello

--
"Those who cast the votes decide nothing.  Those who count the
votes decide everything."
- Joseph Stalin

Reply via email to