Skip to content

Instantly share code, notes, and snippets.

@jk3us
Created January 20, 2009 14:57
Show Gist options
  • Select an option

  • Save jk3us/49506 to your computer and use it in GitHub Desktop.

Select an option

Save jk3us/49506 to your computer and use it in GitHub Desktop.
User Script to focus the textarea on spamcop.net, for quick, keyboard-only spam submission
// ==UserScript==
// @name SpamCop Auto-Focus
// @namespace http://jk3.us/gmns
// @description SpamCop Auto-Focus
// @include http://www.spamcop.net/
// ==/UserScript==
(function() {
var input = document.getElementsByTagName("textarea");
if (input.length == 1)
input[0].focus();
else {
var input = document.getElementById('login').getElementsByTagName('input');
if (input.length >= 1 && input[0].name == 'username')
input[0].focus();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment