Created
August 18, 2014 23:18
-
-
Save mkoryak/d9bf3988167776636354 to your computer and use it in GitHub Desktop.
OP login fix
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 Catman OpenPediatrics Login | |
// @namespace dogself | |
// @version 0.1 | |
// @description log in like catman | |
// @include https://hq.app.openpediatrics.org/webUI | |
// @include https://hq.app.openpediatrics.org/webUI/ | |
// @grant unsafeWindow | |
// @run-at document-end | |
// @copyright dogself | |
// ==/UserScript== | |
USERNAME = "YOUR_EMAIL_GOES_HERE"; | |
function find(cb){ | |
var gimme = function(){ | |
var field = unsafeWindow.document.getElementById('username'); | |
if(!field){ | |
setTimeout(gimme, 50) | |
} else { | |
cb(field); | |
} | |
} | |
gimme(); | |
} | |
find(function(username){ | |
username.value = USERNAME; | |
delete username.dataset.placeholderShown; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment