aboutsummaryrefslogtreecommitdiff
path: root/threepenny.patch
blob: 8420021bcffb558c4eaa01dde44b4f253098663a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 480675cba32803ab74ec064e14ed6b2001c8e071 Mon Sep 17 00:00:00 2001
From: Gregor Kleen <aethoago@141.li>
Date: Tue, 23 Feb 2016 18:14:48 +0000
Subject: [PATCH] Switched to using location.host

---
 js/comm.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/comm.js b/js/comm.js
index 2d24f08..01763ba 100644
--- a/js/comm.js
+++ b/js/comm.js
@@ -14,7 +14,7 @@
 ********************************************************************* */
 Haskell.createWebSocket = function (url0, receive) {
   var that = {};
-  var url  = 'ws:' + url0.slice(5) + 'websocket';
+  var url  = 'ws://' + location.host + '/websocket';
   var ws   = new WebSocket(url);
   
   // Close WebSocket when the browser window is closed.
-- 
2.7.0