summaryrefslogtreecommitdiffstats
path: root/modules-available/main/templates/tm-callback-trigger.html
diff options
context:
space:
mode:
authorSimon Rettberg2016-05-03 19:03:09 +0200
committerSimon Rettberg2016-05-03 19:03:09 +0200
commit50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66 (patch)
tree05e99fdffa696434960d7c77966c0bc36d6339e8 /modules-available/main/templates/tm-callback-trigger.html
parentSecond half of merge.... (diff)
downloadslx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.gz
slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.xz
slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.zip
WIP
Diffstat (limited to 'modules-available/main/templates/tm-callback-trigger.html')
-rw-r--r--modules-available/main/templates/tm-callback-trigger.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules-available/main/templates/tm-callback-trigger.html b/modules-available/main/templates/tm-callback-trigger.html
new file mode 100644
index 00000000..cd03a1fe
--- /dev/null
+++ b/modules-available/main/templates/tm-callback-trigger.html
@@ -0,0 +1,15 @@
+<script type="text/javascript">
+ var slxCbCooldown = 0;
+ function slxCheckCallbacks() {
+ $.post('api.php?do=cb', { token: TOKEN }, function(data) {
+ if ( data.indexOf('True') >= 0 ) {
+ slxCbCooldown = 0;
+ } else {
+ slxCbCooldown++;
+ }
+ if (slxCbCooldown < 4)
+ setTimeout(slxCheckCallbacks, (slxCbCooldown + 1) * 1500);
+ }, 'text');
+ }
+ document.addEventListener("DOMContentLoaded", slxCheckCallbacks, false);
+</script> \ No newline at end of file