# HG changeset patch # User Matthew Wild # Date 1268927392 0 # Node ID ebc14a22a0c1fe753504752cd494fcee2dbd237f # Parent 071c513502d1abaf5efca23061e5330528fb5039 Switch to using a table of config options (will allow for easier configuration later) diff -r 071c513502d1 -r ebc14a22a0c1 js/supportchat.js --- a/js/supportchat.js Thu Mar 18 15:49:13 2010 +0000 +++ b/js/supportchat.js Thu Mar 18 15:49:52 2010 +0000 @@ -1,8 +1,13 @@ /* Config */ -var LOGIN_DOMAIN = "anon.localhost"; -var BOSH_URL = "/http-bind"; -/*** Helper functions */ +var support_config = { + login_domain: "anon.localhost", + bosh_url: "/http-bind", + team_rooms: { + "Sales": "sales@support.localhost", + "Technical": "technical@support.localhost" + } +}; /*** XMPP handling */ var conn = null; @@ -24,11 +29,11 @@ /* Initiate the connection to the XMPP server */ function start_connection() { - conn = new Strophe.Connection(BOSH_URL); + conn = new Strophe.Connection(support_config.bosh_url); var ret = true; try { - conn.connect(LOGIN_DOMAIN, null, handle_connection_status, 50); + conn.connect(support_config.login_domain, null, handle_connection_status, 50); } catch(e) {