Last active
August 29, 2015 14:16
-
-
Save ulybu/3c6995260b4d72be41e0 to your computer and use it in GitHub Desktop.
Auto-login for Ledjamradio.com
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
function showLoginPopup(){ | |
mMain.showPopup('popup_login'); | |
} | |
function login(){ | |
mMain.login(); | |
} | |
function getInput(which){ | |
var selector, | |
input; | |
switch(which){ | |
case 'mail': selector = 'input#login_email'; | |
break; | |
case 'password': selector = 'input#login_pwd'; | |
break; | |
default : alert("t'as craque ton switch"); | |
} | |
if(!(input=document.querySelector(selector))){ | |
alert("echec de selector, z'ont change leur DOM"); | |
} else { | |
return input; | |
} | |
} | |
function fillFields(){ | |
// var mailInput = getInput('mail') | |
// , pwdInput = getInput('password') | |
// ; | |
getInput('mail').value = credentials.mail; | |
getInput('password').value = credentials.pwd; | |
} | |
var credentials = { | |
mail:'[email protected]', | |
pwd: 'PASSWORD' | |
} | |
; | |
// Displaying the popup isn't necessary as we can call the login action directly | |
// (without simulating click event on the "Se connecter" button) | |
// showLoginPopup(); | |
fillFields(); | |
login(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is it
This bookmarklet will log you on one click into http://www.ledjamradio.com/
Bookmarklet ?
Install
credentials
variable with your own credentials. Copy the whole thingladjam login
, paste the code, crunchNote: If your bookmark bar is hidden, google how to display it..
Usage