[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]
w3-javascript-url.el
- To: emacspeak@xxxxxxxxxxx, w3-beta@xxxxxxxxxxx
- Subject: w3-javascript-url.el
- From: "T. V. Raman" <ramantv@xxxxxxxxxxx>
- Date: Sat, 30 Oct 1999 11:26:20 -0700 (PDT)
- Old-Return-Path: <raman@xxxxxxxxxxx>
- Resent-Date: Sat, 30 Oct 1999 14:28:05 -0400 (EDT)
- Resent-From: emacspeak@xxxxxxxxxxx
- Resent-Message-ID: <"FsPpz.A.LrG.ZizG4"@hub>
- Resent-Sender: emacspeak-request@xxxxxxxxxxx
Here is a simple addition to W3 to allow one to jump to
javascript:mumble urls.
It's a hack but it works.
(defvar w3-javascript-cleanup-buffer " *javascript-cleanup*"
"temporary scratch area")
(defun w3-javascript-follow-link ()
"Follow URL hidden inside a javascript link"
(interactive)
(unless (eq major-mode 'w3-mode)
(error "Not in a W3 buffer."))
(let ((url (w3-view-this-url 'no-show))
(buffer (get-buffer-create
w3-javascript-cleanup-buffer)))
(save-excursion
(set-buffer buffer)
(erase-buffer)
(insert url)
(goto-char (point-min))
(search-forward "('")
(delete-region (point-min) (point))
(goto-char (point-max))
(search-backward "'")
(delete-region (point) (point-max))
(w3-fetch
(buffer-string)))))
(define-key w3-mode-map "\M-j" 'w3-javascript-follow-link)
--
Best Regards,
--raman
Email: raman@xxxxxxxxxxx
WWW: http://cs.cornell.edu/home/raman/
PGP: http://cs.cornell.edu/home/raman/raman.asc
-----------------------------------------------------------------------------
To unsubscribe or change your address send mail to
"emacspeak-request@xxxxxxxxxxx" with a subject of "unsubscribe" or "help"
Emacspeak Files |
Subscribe |
Unsubscribe