diff --git a/www/common/hyperjson.js b/www/common/hyperjson.js index 9a363bb79..b9dc87b9b 100644 --- a/www/common/hyperjson.js +++ b/www/common/hyperjson.js @@ -4,16 +4,6 @@ define([], function () { return Object.prototype.toString.call(A)==='[object Array]'; }; - var parseStyle = function(el){ - var style = el.style; - var output = {}; - for (var i = 0; i < style.length; ++i) { - var item = style.item(i); - output[item] = style[item]; - } - return output; - }; - var callOnHyperJSON = function (hj, cb) { var children; @@ -23,9 +13,7 @@ define([], function () { // if the child is an array, recurse return callOnHyperJSON(child, cb); } else if (typeof (child) === 'string') { - // string nodes have leading and trailing quotes - // don't strip them! - return child; //child.replace(/(^"|"$)/g,""); + return child; } else { // the above branches should cover all methods // if we hit this, there is a problem @@ -39,16 +27,6 @@ define([], function () { return cb(hj[0], hj[1], children); }; - var classify = function (token) { - return '.' + token.trim(); - }; - - var isValidClass = function (x) { - if (x && /\S/.test(x)) { - return true; - } - }; - var isTruthy = function (x) { return x; }; @@ -71,15 +49,10 @@ define([], function () { var i = 0; for(;i < el.attributes.length; i++){ - var attr = el.attributes[i]; - if(attr.name && attr.value){ - if(attr.name === "style"){ - attributes.style = parseStyle(el); - } - else{ - attributes[attr.name] = attr.value; + var attr = el.attributes[i]; + if(attr.name && attr.value){ + attributes[attr.name] = attr.value; } - } } // this should never be longer than three elements