Last active
August 29, 2015 14:21
-
-
Save bo33b/962c2f2418933ab30918 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name Username Filler | |
// @namespace bo33b | |
// @description Fill in a username in any login form | |
// @downloadURL https://gist.github.com/bo33b/962c2f2418933ab30918/raw/username.user.js | |
// @include https://accounts.google.com/ServiceLogin* | |
// @version 1.0 | |
// @grant none | |
// ==/UserScript== | |
var id = 'put_your_username_here'; | |
(function fillUsername(id) { | |
var c = document.getElementsByTagName('input'), | |
l = c.length, | |
i = 0, | |
input = null, | |
done = false; | |
for (; i < l; i++) { | |
input = c[i]; | |
if (input.type == 'text') { | |
input.focus(); | |
input.value = id; | |
done = true; | |
} | |
if (input.type == 'email') { | |
input.focus(); | |
input.value = id+'@gmail.com'; | |
done = true; | |
} | |
if (done && input.type == 'submit') { | |
input.click(); | |
} | |
} | |
})(id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment