[tor-commits] [pups/production] Swapped variables for constants in prodromus.js
colin at torproject.org
colin at torproject.org
Fri Oct 24 03:44:56 UTC 2014
commit 1de141d1c8602e2d6f0e9f5a7ac1495677286ef3
Author: Sherief Alaa <sheriefalaa.w at gmail.com>
Date: Tue Jun 17 13:41:30 2014 +0300
Swapped variables for constants in prodromus.js
---
static/js/prodromus.js | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/static/js/prodromus.js b/static/js/prodromus.js
index ee9f7c7..7dbe826 100644
--- a/static/js/prodromus.js
+++ b/static/js/prodromus.js
@@ -42,9 +42,9 @@
* @license Affero General Public License
*/
-_assistantNotAvailable = 0
-_assistantAvailable = 1
-_serverError = 2
+const ASSISTANT_NOT_AVAILABLE = 0
+const ASSISTANT_AVAILABLE = 1
+const SERVER_ERROR = 2
var assisantStatus;
var status_msg;
@@ -227,7 +227,7 @@ Prodromus.actionhandler = {
Prodromus.buildAndSendMessage(
Prodromus.Util.htmlspecialchars( Prodromus.config.SENDERNAME ) + Prodromus.i18n.t9n( 'msg-hello' )
- , 'chat'
+ , 'chat'
);
Prodromus.buildAndSendMessage("Token: " + Prodromus.config.TOKEN, 'chat', true);
@@ -463,20 +463,20 @@ Prodromus.PresenceReporter =
// Available
if ( (presence_type === undefined) && (show === '' || show === 'chat') )
{
- assisantStatus = _assistantAvailable;
+ assisantStatus = ASSISTANT_AVAILABLE;
return true;
}
// Not Available
if (presence_type === 'unavailable' || show === 'xa' || show === 'dnd' || 'away')
{
- assisantStatus = _assistantNotAvailable;
+ assisantStatus = ASSISTANT_NOT_AVAILABLE;
return true;
}
}
else
{
- assisantStatus = _serverError;
+ assisantStatus = SERVER_ERROR;
}
}
return true;
@@ -493,7 +493,7 @@ Prodromus.PresenceReporter =
giveFeedback: function()
{
- if (assisantStatus !== _assistantAvailable)
+ if (assisantStatus !== ASSISTANT_AVAILABLE)
{
if (status_msg !== undefined)
{
More information about the tor-commits
mailing list