Add some useful greasemonkey scripts.
This commit is contained in:
parent
859e859785
commit
733983417e
35
greasemonkey/autocomplete
Normal file
35
greasemonkey/autocomplete
Normal 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');
|
||||
|
||||
}
|
||||
|
||||
}
|
17
greasemonkey/resize_and_spellcheck
Normal file
17
greasemonkey/resize_and_spellcheck
Normal 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);
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user