diff --git a/injected.html b/injected.html index 59b7695..ab395e8 100644 --- a/injected.html +++ b/injected.html @@ -18,7 +18,7 @@ } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; - var address = protocol + window.location.host + window.location.pathname + '/ws'; + var address = protocol + window.location.host + window.location.pathname.replace(/\/$/, "") + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload();