Created
December 11, 2012 08:23
-
-
Save sampel/4256884 to your computer and use it in GitHub Desktop.
Piece of javascript code: gets the service parameter rom the url (GET) and check if contains something
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
/*********************************/ | |
/* by Sampel */ | |
/* */ | |
/* When users come to my portal */ | |
/* if they come to login, then */ | |
/* show the login. The only way */ | |
/* know if the user comes to log */ | |
/* in is with the get parameter */ | |
/* service */ | |
/*********************************/ | |
$(function() { | |
function getURLParameter(name) { | |
return decodeURI( (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] ); | |
} | |
if (getURLParameter("service").indexOf("spring_cas_security_check") > -1) { | |
toogleLoginModal(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment