There are 2 previous versions of this script.
// ==UserScript==
// @name Autocomplete On
// @namespace http://userscripts.org/scripts/show/7347
// @description Searches for autocomplete attributes in the page and sets the value to on.
// @include *
// ==/UserScript==
location.href = "javascript:(" + function() {
function enableAutocomplete()
{
// Get all autocomplete attributes
var oNodeSnapshot = document.evaluate('//@autocomplete', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null), numNodeValues = oNodeSnapshot.snapshotLength - 1;
//Loop through all the attributes found in the snapshot
for (var i = numNodeValues; i >= 0; i--) {
//Get the attribute snapshot object and
//Change the attribute value to "on"
oNodeSnapshot.snapshotItem(i).nodeValue = 'on';
}
}
function newSubmit()
{
enableAutocomplete();
if (this._submit !== undefined) {
this._submit();
}
}
//override DOM submit
HTMLFormElement.prototype._submit = HTMLFormElement.prototype.submit;
HTMLFormElement.prototype.submit = newSubmit;
//Run enable on form submit and page load
window.addEventListener('submit', newSubmit, true);
window.addEventListener('load', enableAutocomplete, false);
} + ")()";
