Enable Autocomplete & Remember Passwords

By hirak99 Last update Nov 8, 2008 — Installed 1,056 times. Daily Installs: 3, 0, 3, 1, 0, 1, 2, 2, 2, 1, 2, 2, 4, 0, 4, 4, 0, 1, 0, 0, 0, 2, 4, 3, 1, 1, 0, 1, 2, 1, 0, 3

There are 2 previous versions of this script.

// ==UserScript==
// @name           Force Autocomplete & Remember Passwords
// @namespace      arnab
// @version        1.00
// @description    Remembers passwords in sites like del.ici.ous and yahoo.
// @include        https://secure.delicious.com/*
// @include        https://login.yahoo.com/*
// ==/UserScript==

function enableAutoComplete(element) {
	if (element.hasAttribute("autocomplete"))
		element.setAttribute("autocomplete","on");
}

allfields=document.getElementsByClassName("field");
for (i=0; i<allfields.length; ++i)
	enableAutoComplete(allfields[i]);

for (i=0; i<document.forms.length; ++i)
	enableAutoComplete(document.forms[i]);