Created
January 20, 2009 14:57
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==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