diff options
Diffstat (limited to 'resources/assets/javascripts/bootstrap/jsupdater.js')
| -rw-r--r-- | resources/assets/javascripts/bootstrap/jsupdater.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/resources/assets/javascripts/bootstrap/jsupdater.js b/resources/assets/javascripts/bootstrap/jsupdater.js new file mode 100644 index 0000000..9fbcd0e --- /dev/null +++ b/resources/assets/javascripts/bootstrap/jsupdater.js @@ -0,0 +1,10 @@ +// Start js updater if global settings says so +$(window).on('load', function() { + if (STUDIP.jsupdate_enable) { + STUDIP.JSUpdater.start(); + } +}); + +// Try to stop js updater if window is unloaded (might not work in all +// browsers) +$(window).on('unload', STUDIP.JSUpdater.stop); |
