[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: store passwords
On Sun, 23 Jul'06 06:26:21 +0000 (UTC), harry wrote:
> Hi,
>
> is it possible to store passwords in w3m? If I am visiting a discussion forum
> quite often I always have to insert my name and password by hand. Is there a way
> to take advantage of the auto login?
>
> Greets
> harry
Hi,
Here's some hack to make this a bit more convenient.
my-w3m-form-input-auto-lookup matchs the form against my alist of (URL
. username), and (URL . pw). Obviously not auto form fill, but saves me a
lot of typing.
-kin
(defadvice w3m-form-input(around my-fill-in-form activate)
(let ((form (ad-get-arg 0))(id (ad-get-arg 1))(name (ad-get-arg 2))
(input (my-w3m-form-input-auto-lookup form my-w3m-form-input-auto)))
(cond
(input (w3m-form-put form id name input) (w3m-form-replace input))
(t ad-do-it))))
(defadvice w3m-form-input-password(around my-fill-in-pw activate)
(let ((form (ad-get-arg 0))(id (ad-get-arg 1))(name (ad-get-arg 2))
(input (my-w3m-form-input-auto-lookup form my-w3m-form-input-pw-auto)))
(cond
(input (w3m-form-put form id name input)
(w3m-form-replace input 'invisible))
(t ad-do-it))))