scripts/greasemonkey/autocomplete

36 lines
579 B
Plaintext
Raw Permalink Normal View History

2014-09-25 23:38:43 +02:00
// ==UserScript==
// @name Autocomplete set on
// @namespace Autocomplet set on
// @description Make all forms to allow autocomplet
// @include *
// @version 1
// @grant none
// ==/UserScript==
var frm = document.getElementsByTagName('form');
for (var i = 0, n = frm.length; i < n; i++) {
frm[i].setAttribute('autocomplete', 'on');
}
var inp = document.getElementsByTagName('input');
for (var i = 0, n = inp.length; i < n; i++) {
if (inp[i].getAttribute('autocomplete') == 'off') {
inp[i].setAttribute('autocomplete', 'on');
}
}