lemonldap-ng/lemonldap-ng-portal/example/skins/common/browseridlogin.js
2013-10-15 09:58:37 +00:00

27 lines
488 B
JavaScript

$(document).ready(function(){
// Manage auto login
if (browserIdAutoLogin.match('1')) {
launchRequest();
}
// Intercept submit the first time
var intercepted = 0;
$("form.BrowserID").submit(function( event ) {
if (!intercepted) {
event.preventDefault();
intercepted = 1;
launchRequest();
}
});
});
function launchRequest() {
navigator.id.request({
siteName: browserIdSiteName,
siteLogo: browserIdSiteLogo,
backgroundColor: browserIdBackgroundColor
});
}