aboutsummaryrefslogtreecommitdiffstats
path: root/client/client.js
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2018-03-25 23:16:02 +0200
committermarzavec <admin@marzavec.com>2018-03-25 23:16:02 +0200
commitce766fa1db1a6c3cc83f588373c927ffa04733ba (patch)
treec5f4f86b8df1808cb4f14ca3e77ba411927db306 /client/client.js
parentAdded unban by hash (diff)
downloadhackchat-ce766fa1db1a6c3cc83f588373c927ffa04733ba.tar.gz
hackchat-ce766fa1db1a6c3cc83f588373c927ffa04733ba.zip
Rolled client back to legacy & synced prod modules
Diffstat (limited to 'client/client.js')
-rw-r--r--client/client.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/client/client.js b/client/client.js
index e8c3b79..254480d 100644
--- a/client/client.js
+++ b/client/client.js
@@ -19,14 +19,13 @@ var frontpage = [
"Whitespace is preserved, so source code can be pasted verbatim.",
"Surround LaTeX with a dollar sign for inline style $\\zeta(2) = \\pi^2/6$, and two dollars for display. $$\\int_0^1 \\int_0^1 \\frac{1}{1-xy} dx dy = \\frac{\\pi^2}{6}$$",
"",
- "GitHub: https://github.com/AndrewBelt/hack.chat",
- "Android apps: https://goo.gl/UkbKYy https://goo.gl/qasdSu https://goo.gl/fGQFQN",
+ "Current Github: https://github.com/hack-chat includes server and client source along with other resources",
"",
- "Server and web client released under the MIT open source license.",
- "No message history is retained on the hack.chat server.",
+ "Legacy GitHub: https://github.com/AndrewBelt/hack.chat",
+ "Android apps: https://goo.gl/UkbKYy https://goo.gl/qasdSu https://goo.gl/fGQFQN",
"",
- "[03/03/2018] Please note that the server is currently undergoing changes, expect random downtime or disconnections!",
- "[03/03/2018] Hack.chat is now under new management by the core community; @raf924 @bacon @wwandrew @Rut @_0x17 @M4GNV5 @MinusGix @nanotech",
+ "Server and web client released under the WTFPL and MIT open source license.",
+ "No message history is retained on the hack.chat server."
].join("\n")
function $(query) {return document.querySelector(query)}
@@ -60,8 +59,13 @@ window.setInterval(function() {
function join(channel) {
-
- ws = new WebSocket('ws://127.0.0.1:6060')
+ if (document.domain == 'hack.chat') {
+ // For https://hack.chat/
+ ws = new WebSocket('wss://hack.chat/chat-ws')
+ } else {
+ // for local installs
+ ws = new WebSocket('ws://' + document.domain + ':6060')
+ }
var wasConnected = false