diff --git a/resources/PluginIndex.html b/resources/PluginIndex.html
index 275c091..05d1cfe 100755
--- a/resources/PluginIndex.html
+++ b/resources/PluginIndex.html
@@ -670,7 +670,7 @@
}
function doStuff() {
- socket = new WebSocket("ws://" + window.location.href.replace("http://", "") + "app");
+ socket = new WebSocket(window.location.href.replace(/^http/, "ws") + "app");
socket.onopen = function(evt) {
term = new Terminal({
rows: Math.floor(($(window).height() - 301)/ 12),