Add some useful greasemonkey scripts.

This commit is contained in:
gardouille 2014-09-25 23:38:43 +02:00
parent 859e859785
commit 733983417e
2 changed files with 52 additions and 0 deletions

35
greasemonkey/autocomplete Normal file
View File

@ -0,0 +1,35 @@
// ==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');
}
}

View File

@ -0,0 +1,17 @@
var txtarea = document.getElementsByTagName('textarea');
for (var i = 0, n = txtarea.length; i < n; i++) {
if (txtarea[i].style.resize == 'none') {
txtarea[i].style.resize = 'both';
}
if (txtarea[i].getAttribute('spellcheck') == false) {
txtarea[i].setAttribute('spellcheck', true);
}
}