diff options
Diffstat (limited to 'Cydia.app/menes/menes.js')
-rw-r--r-- | Cydia.app/menes/menes.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Cydia.app/menes/menes.js b/Cydia.app/menes/menes.js index 64ec5d0..f0070bc 100644 --- a/Cydia.app/menes/menes.js +++ b/Cydia.app/menes/menes.js @@ -27,9 +27,10 @@ var $ = function (arg, doc) { if (arg.charAt(0) == '#') { var node = doc.getElementById(arg.substring(1)); return $(node == null ? [] : [node]); - } else if (arg.charAt(0) == '.') - return new $(doc.getElementsByClassName(arg.substring(1))); - else + } else if (arg.charAt(0) == '.') { + var nodes = doc.getElementsByClassName(arg.substring(1)); + return $(nodes == null ? [] : nodes); + } else return $([doc]).descendants(arg); } else { _assert(doc == undefined); @@ -184,6 +185,15 @@ $.inject = function (a, b) { }; $.inject({ + display: { + get: function (node) { + return node.style.display; + }, + set: function (node, value) { + node.style.display = value; + } + }, + html: { get: function (node) { return node.innerHTML; |