Created
April 3, 2013 13:18
-
-
Save NKjoep/5301124 to your computer and use it in GitHub Desktop.
Bookmarklet: Fill That Form with Random Numbers
This file contains 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
javascript: (function () {function fill(input) {if ((input.tagName == 'input' && (input.type != 'hidden' && input.type != 'submit' && input.type != 'image')) || (input.tagName == 'textarea')) {if (input.value == null || input.value.length==0) {input.value = Math.floor(Math.random() * 9999999)}}}var inputs = document.getElementsByTagName("input");for (var i = 0; i < inputs.length; i++) {fill(inputs[i]);}var inputs = document.getElementsByTagName("textarea");for (var i = 0; i < inputs.length; i++) {fill(inputs[i]);}})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment