windhamdavid 10 years ago
parent
commit
16fb3d37de
1 changed files with 1 additions and 1 deletions
  1. 1 1
      inc/tweaks.php

+ 1 - 1
inc/tweaks.php

@@ -105,7 +105,7 @@ function dw_online_get_chat() {
 		<script type="text/javascript">
 		<script type="text/javascript">
 		Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};var i;i = 0;
 		Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};var i;i = 0;
 		$(function(){var msg_return; msg_return = Messenger().run({id: 'one',errorMessage: 'Looking for David...', action: function(opts) {if (++i < 2) {get_dave();return opts.error({status: 500,readyState: 0,responseText: 0});}}});});
 		$(function(){var msg_return; msg_return = Messenger().run({id: 'one',errorMessage: 'Looking for David...', action: function(opts) {if (++i < 2) {get_dave();return opts.error({status: 500,readyState: 0,responseText: 0});}}});});
-		function get_dave() {$(function poll() {var x = 0; var countTimer = setInterval(function () {if(x > 5){clearInterval(countTimer)}else if(x == 5){dave_not_available()}else{var URLchatAPI = "http://macs.local:8080/status";var request = $.ajax({url: URLchatAPI,dataType: 'json',cache: false, success: function (data) {online = data.online;if(online=='yes') {$('.chat').modal('show');x = x+5;};if (online=='no') {dave_connecting();};},error: function ( xhr, tStatus, err ) {dave_error();x = x+5;}});x++;}}, 5000);});}
+		function get_dave() {$(function poll() {var x = 0; var countTimer = setInterval(function () {if(x > 5){clearInterval(countTimer)}else if(x == 5){dave_not_available()}else{var URLchatAPI = "http://code.davidawindham.com:8080/status";var request = $.ajax({url: URLchatAPI,dataType: 'json',cache: false, success: function (data) {online = data.online;if(online=='yes') {$('.chat').modal('show');x = x+5;};if (online=='no') {dave_connecting();};},error: function ( xhr, tStatus, err ) {dave_error();x = x+5;}});x++;}}, 5000);});}
 		function dave_connecting(){var y;y = 0;var msg_waiting; msg_waiting = Messenger().run({id: 'one',hideAfter: 4,errorMessage: 'Waiting on David...',action: function(opts) {if (++y < 2) {get_dave();return opts.error({status: 500,readyState: 0,responseText: 0});}}});}		
 		function dave_connecting(){var y;y = 0;var msg_waiting; msg_waiting = Messenger().run({id: 'one',hideAfter: 4,errorMessage: 'Waiting on David...',action: function(opts) {if (++y < 2) {get_dave();return opts.error({status: 500,readyState: 0,responseText: 0});}}});}		
 		function dave_not_available(){var msg_error; msg_error = Messenger().post({message: 'Sorry, but I am busy.',type: 'error',id: 'one',showCloseButton: true,actions:{cancel: {label: 'Leave me a message',action: function(){window.location.href = '../';}}}});}
 		function dave_not_available(){var msg_error; msg_error = Messenger().post({message: 'Sorry, but I am busy.',type: 'error',id: 'one',showCloseButton: true,actions:{cancel: {label: 'Leave me a message',action: function(){window.location.href = '../';}}}});}
 		function dave_error(){var msg_error; msg_error = Messenger().post({message: 'Oops. Something has gone wrong.',type: 'error',id: 'one',showCloseButton: true,actions:{cancel: {label: 'Leave me a message',action: function(){window.location.href = '../';}}}});}
 		function dave_error(){var msg_error; msg_error = Messenger().post({message: 'Oops. Something has gone wrong.',type: 'error',id: 'one',showCloseButton: true,actions:{cancel: {label: 'Leave me a message',action: function(){window.location.href = '../';}}}});}