lemonldap-ng/lemonldap-ng-portal/site/htdocs/static/common/js/browseridlogin.js

26 lines
516 B
JavaScript
Raw Normal View History

2014-02-05 17:30:30 +01:00
$(document).ready(function() {
2016-01-21 12:36:23 +01:00
// Manage auto login
if (browserIdAutoLogin.match('1')) {
launchRequest();
}
2016-01-21 12:36:23 +01:00
// Intercept submit the first time
var intercepted = 0;
$("form.BrowserID").submit(function(event) {
if (!intercepted) {
event.preventDefault();
intercepted = 1;
launchRequest();
}
});
});
function launchRequest() {
2016-01-21 12:36:23 +01:00
navigator.id.request({
siteName: browserIdSiteName,
siteLogo: browserIdSiteLogo,
backgroundColor: browserIdBackgroundColor
});
}