Sha256: ba87eef198b30ead20d6973ad5c77a2af11343c559506543eaf4fd75dd00b040
Contents?: true
Size: 579 Bytes
Versions: 8
Compression:
Stored size: 579 Bytes
Contents
#= require jquery.pjax class AssessmentTimer constructor: (@timeoutInterval, @timeout) -> @start() start: -> @timeoutId = window.setTimeout => @timeout() , @timeoutInterval * 1000 restart: -> window.clearTimeout @timeoutId @start() $ -> if $("[data-timeout]").length and $.support.pjax timeoutInterval = parseInt($("[data-timeout]").attr("data-timeout")) window.assessmentTimer = new AssessmentTimer timeoutInterval, -> window.location.href += "/timeout" $(document).on "pjax:send", -> window.assessmentTimer.restart()
Version data entries
8 entries across 8 versions & 1 rubygems