Added plugin for autologin
authorjdeveloper <jdeveloper.inxenio@gmail.com>
Tue, 19 Nov 2013 12:32:52 +0000 (13:32 +0100)
committerjdeveloper <jdeveloper.inxenio@gmail.com>
Tue, 19 Nov 2013 12:32:52 +0000 (13:32 +0100)
client/assets/plugins/auto_login.html [new file with mode: 0644]

diff --git a/client/assets/plugins/auto_login.html b/client/assets/plugins/auto_login.html
new file mode 100644 (file)
index 0000000..ea8b03c
--- /dev/null
@@ -0,0 +1,21 @@
+<script type="text/javascript">
+    var net = kiwi.components.Network();
+    var input = kiwi.components.ControlInput();
+
+    if(getQueryVariable('channel')){
+        var channel = "#" + getQueryVariable('channel');
+        
+        $('.server_select').hide();
+        $('#server_select_channel').val(channel);
+        $('form button').click();
+    }else if(getQueryVariable('private')){
+        var private = getQueryVariable('private');
+        
+        $('.server_select').hide();
+        $('form button').click();
+
+        net._source.bind('onconnect', function(){
+            input.run('/query '+private);
+        })
+    }
+</script>
\ No newline at end of file