Commit e329a6b5 by Sheng

Remove spaces

parent 3dd7b98c
...@@ -107,12 +107,12 @@ jQuery(function($){ ...@@ -107,12 +107,12 @@ jQuery(function($){
// wssh.sock = sock; // wssh.sock = sock;
// wssh.term = term; // wssh.term = term;
function resize_terminal (term) { function resize_terminal(term) {
var geometry = current_geometry(); var geometry = current_geometry();
term.on_resize(geometry.cols, geometry.rows); term.on_resize(geometry.cols, geometry.rows);
} }
function set_encoding (new_encoding) { function set_encoding(new_encoding) {
// for console use // for console use
if (new_encoding === undefined) { if (new_encoding === undefined) {
console.log('An encoding is required'); console.log('An encoding is required');
...@@ -138,7 +138,7 @@ jQuery(function($){ ...@@ -138,7 +138,7 @@ jQuery(function($){
console.log('Current window geometry: ' + JSON.stringify(geometry)); console.log('Current window geometry: ' + JSON.stringify(geometry));
}; };
wssh.websocket_send = function (data) { wssh.websocket_send = function(data) {
// for console use // for console use
if (!sock) { if (!sock) {
console.log('Websocket was already closed'); console.log('Websocket was already closed');
...@@ -158,7 +158,7 @@ jQuery(function($){ ...@@ -158,7 +158,7 @@ jQuery(function($){
} }
}; };
wssh.reset_encoding = function () { wssh.reset_encoding = function() {
// for console use // for console use
if (encoding === msg.encoding) { if (encoding === msg.encoding) {
console.log('Already reset to ' + msg.encoding); console.log('Already reset to ' + msg.encoding);
...@@ -167,7 +167,7 @@ jQuery(function($){ ...@@ -167,7 +167,7 @@ jQuery(function($){
} }
}; };
wssh.resize_terminal = function (cols, rows) { wssh.resize_terminal = function(cols, rows) {
// for console use // for console use
if (term === undefined) { if (term === undefined) {
console.log('Terminal was already destroryed'); console.log('Terminal was already destroryed');
...@@ -190,7 +190,7 @@ jQuery(function($){ ...@@ -190,7 +190,7 @@ jQuery(function($){
} }
}; };
term.on_resize = function (cols, rows) { term.on_resize = function(cols, rows) {
if (cols !== this.geometry[0] || rows !== this.geometry[1]) { if (cols !== this.geometry[0] || rows !== this.geometry[1]) {
console.log('Resizing terminal to geometry: ' + format_geometry(cols, rows)); console.log('Resizing terminal to geometry: ' + format_geometry(cols, rows));
this.resize(cols, rows); this.resize(cols, rows);
...@@ -213,7 +213,7 @@ jQuery(function($){ ...@@ -213,7 +213,7 @@ jQuery(function($){
sock.onmessage = function(msg) { sock.onmessage = function(msg) {
var reader = new window.FileReader(); var reader = new window.FileReader();
reader.onload = function(){ reader.onload = function() {
var text = decoder.decode(reader.result); var text = decoder.decode(reader.result);
// console.log(text); // console.log(text);
if (term) { if (term) {
...@@ -307,7 +307,7 @@ jQuery(function($){ ...@@ -307,7 +307,7 @@ jQuery(function($){
wssh.connect = connect; wssh.connect = connect;
$(form_id).submit(function(event) { $(form_id).submit(function(event){
event.preventDefault(); event.preventDefault();
connect(); connect();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment