]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Remove WebUtil.dirObj
authorSolly Ross <sross@redhat.com>
Sat, 4 Feb 2017 22:16:05 +0000 (17:16 -0500)
committerSolly Ross <sross@redhat.com>
Tue, 7 Mar 2017 16:11:29 +0000 (11:11 -0500)
`WebUtil.dirObj` wasn't being used anywhere, so this removes it.

app/webutil.js

index 6afd015fd8613ca9a32b5d659b53a208e436c056..e77c5e202cc55797cb805aba32b574ae08854876 100644 (file)
@@ -33,35 +33,6 @@ WebUtil.init_logging = function (level) {
     Util.init_logging();
 };
 
-
-WebUtil.dirObj = function (obj, depth, parent) {
-    "use strict";
-    if (! depth) { depth = 2; }
-    if (! parent) { parent = ""; }
-
-    // Print the properties of the passed-in object
-    var msg = "";
-    for (var i in obj) {
-        if ((depth > 1) && (typeof obj[i] === "object")) {
-            // Recurse attributes that are objects
-            msg += WebUtil.dirObj(obj[i], depth - 1, parent + "." + i);
-        } else {
-            //val = new String(obj[i]).replace("\n", " ");
-            var val = "";
-            if (typeof(obj[i]) === "undefined") {
-                val = "undefined";
-            } else {
-                val = obj[i].toString().replace("\n", " ");
-            }
-            if (val.length > 30) {
-                val = val.substr(0, 30) + "...";
-            }
-            msg += parent + "." + i + ": " + val + "\n";
-        }
-    }
-    return msg;
-};
-
 // Read a query string variable
 WebUtil.getQueryVar = function (name, defVal) {
     "use strict";