Skip to content

Instantly share code, notes, and snippets.

@vasilisvg
Created July 24, 2011 19:18
Show Gist options
  • Save vasilisvg/1102965 to your computer and use it in GitHub Desktop.
Save vasilisvg/1102965 to your computer and use it in GitHub Desktop.
Delicious with a usable text area
// ==UserScript==
// @name Delicious - input
// @namespace http://vasilis.nl/
// @description Embiggens the textarea on Delicious
// @include http://www.delicious.com/save*
// ==/UserScript==
(function() {
var el = document.createElement('style');
el.innerHTML = '#saveNotes{min-height:200px!important;min-width:600px;font-size:16px}.fieldMsg{width:594px!important}';
document.head.appendChild(el);
}());
@mathiasbynens
Copy link

document.body.innerHTML = (document.body.innerHTML + bigStyle); could be written as document.body.innerHTML += bigStyle; but still you shouldn’t use it as it will remove all bound event handlers.

Use document.body.appendChild(bigStyleElement) instead, or even document.head.appendChild(bigStyleElement).

Update: I meant something like this:

(function() {
  var el = document.createElement('style');
  el.innerHTML = '#saveNotes{min-height:200px!important;min-width:600px;font-size:16px}.fieldMsg{width:594px!important}';
  document.head.appendChild(el);
}());

@vasilisvg
Copy link
Author

Changed the script thanks to mathiasbynens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment