[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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"
  (unless (eq major-mode 'w3-mode)
    (error "Not in a W3 buffer."))
  (let ((url (w3-view-this-url 'no-show))
        (buffer (get-buffer-create
      (set-buffer 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))

(define-key w3-mode-map "\M-j" 'w3-javascript-follow-link)

Best Regards,

Email:  raman@cs.cornell.edu
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@cs.vassar.edu" with a subject of "unsubscribe" or "help"

Emacspeak Files | Subscribe | Unsubscribe