Indents are 8 positions, NEVER 4, and are comprised of tabs, not spaces. Anyone...
authorArt Cancro <ajc@citadel.org>
Sun, 28 Apr 2019 22:06:10 +0000 (18:06 -0400)
committerArt Cancro <ajc@citadel.org>
Sun, 28 Apr 2019 22:06:10 +0000 (18:06 -0400)
webcit-ng/static/js/main.js

index 3c89914ac57b5d17a071a242eed388f9ded622fc..f0b0e90a4484b300f55c22cfe8b4abbb1cf531b6 100644 (file)
@@ -34,12 +34,11 @@ function _(x) {
 //
 function randomString(length) {
        var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz'.split('');
 //
 function randomString(length) {
        var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz'.split('');
+       var str = '';
 
 
-       if (! length) {
+       if (!length) {
                length = Math.floor(Math.random() * chars.length);
        }
                length = Math.floor(Math.random() * chars.length);
        }
-
-       var str = '';
        for (var i = 0; i < length; i++) {
                str += chars[Math.floor(Math.random() * chars.length)];
        }
        for (var i = 0; i < length; i++) {
                str += chars[Math.floor(Math.random() * chars.length)];
        }
@@ -50,35 +49,35 @@ function randomString(length) {
 // string escape for html display
 //
 function escapeHTML(text) {
 // string escape for html display
 //
 function escapeHTML(text) {
-    'use strict';
-    return text.replace(/[\"&<>]/g, function (a) {
-        return {
-               '"': '&quot;',
-               '&': '&amp;',
-               '<': '&lt;',
-               '>': '&gt;'
-       }[a];
-    });
+       'use strict';
+       return text.replace(/[\"&<>]/g, function (a) {
+               return {
+                       '"': '&quot;',
+                       '&': '&amp;',
+                       '<': '&lt;',
+                       '>': '&gt;'
+               }[a];
+       });
 }
 
 
 // string escape for html display
 //
 function escapeHTMLURI(text) {
 }
 
 
 // string escape for html display
 //
 function escapeHTMLURI(text) {
-    'use strict';
-    return text.replace(/./g, function (a) {
-        return '%' + a.charCodeAt(0).toString(16);
-    });
+       'use strict';
+       return text.replace(/./g, function (a) {
+               return '%' + a.charCodeAt(0).toString(16);
+       });
 }
 
 
 // string escape for JavaScript string
 //
 function escapeJS(text) {
 }
 
 
 // string escape for JavaScript string
 //
 function escapeJS(text) {
-    'use strict';
-    return text.replace(/[\"\']/g, function (a) {
-        return '\\' + a ;
-    });
+       'use strict';
+       return text.replace(/[\"\']/g, function (a) {
+               return '\\' + a ;
+       });
 }
 
 
 }
 
 
@@ -96,6 +95,7 @@ function ctdl_startup() {
        request = null;
 }
 
        request = null;
 }
 
+
 // Continuation of ctdl_startup() after serv_info is retrieved
 //
 function ctdl_startup_2(data) {
 // Continuation of ctdl_startup() after serv_info is retrieved
 //
 function ctdl_startup_2(data) {
@@ -112,6 +112,7 @@ function ctdl_startup_2(data) {
        display_room_list();
 }
 
        display_room_list();
 }
 
+
 // Display a room list in the main div.
 //
 function display_room_list() {
 // Display a room list in the main div.
 //
 function display_room_list() {
@@ -128,6 +129,7 @@ function display_room_list() {
        request = null;
 }
 
        request = null;
 }
 
+
 // Renderer for display_room_list()
 //
 function display_room_list_renderer(data) {
 // Renderer for display_room_list()
 //
 function display_room_list_renderer(data) {
@@ -162,6 +164,7 @@ function display_room_list_renderer(data) {
        document.getElementById("roomlist").innerHTML = new_roomlist_text ;
 }
 
        document.getElementById("roomlist").innerHTML = new_roomlist_text ;
 }
 
+
 // Update the "banner" div with all relevant info.
 //
 function update_banner() {
 // Update the "banner" div with all relevant info.
 //
 function update_banner() {