lemonldap-ng/lemonldap-ng-portal/site/coffee/globalLogout.coffee
2019-11-13 20:56:56 +01:00

18 lines
290 B
CoffeeScript

# Timer for globalLogout page
i = 30
go = () ->
$("#globallogout").submit()
timer = () ->
h = $('#timer').html()
i-- if i>0
h = h.replace /\d+/, i
$('#timer').html(h)
window.setTimeout timer, 1000
$(document).ready ->
window.setTimeout go, 30000
window.setTimeout timer, 1000