BigBisous

Resize Textarea on

Dec 13th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Resize Textarea on
  3. // @namespace   Resize Textarea on
  4. // @description Allows the resize of textareas
  5. // @include     *
  6. // @version     1
  7. // @grant       none
  8. // ==/UserScript==
  9. var txtarea = document.getElementsByTagName('textarea');
  10. for (var i = 0, n = txtarea.length; i < n; i++) {
  11.   if (txtarea[i].style.resize == 'none') {
  12.     txtarea[i].style.resize = 'both';
  13.   }
  14.   if (txtarea[i].getAttribute('spellcheck') == false) {
  15.     txtarea[i].setAttribute('spellcheck', true);
  16.   }
  17. }
Add Comment
Please, Sign In to add comment