lemonldap-ng/lemonldap-ng-portal/site/htdocs/static/common/js/browseridlogin.js
2016-04-14 18:42:59 +00:00

26 lines
516 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
});
}