summaryrefslogblamecommitdiffstats
path: root/modules-available/main/templates/tm-callback-trigger.html
blob: cd03a1fe6f1366b8860f8505300ba09710987132 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
                               











                                                                                          
                                                                                
        
<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>