one-liner

This commit is contained in:
James Campos 2011-05-07 18:55:21 -07:00
parent 9de8b54f15
commit 3540e6a5ca
2 changed files with 2 additions and 5 deletions

View File

@ -434,12 +434,10 @@
}); });
} }
$$ = function(selector, root) { $$ = function(selector, root) {
var result;
if (root == null) { if (root == null) {
root = d.body; root = d.body;
} }
result = root.querySelectorAll(selector); return Array.prototype.slice.call(root.querySelectorAll(selector));
return Array.prototype.slice.call(result);
}; };
expandComment = { expandComment = {
init: function() { init: function() {

View File

@ -299,8 +299,7 @@ else
localStorage[name] = JSON.stringify value localStorage[name] = JSON.stringify value
$$ = (selector, root=d.body) -> $$ = (selector, root=d.body) ->
result = root.querySelectorAll selector Array::slice.call root.querySelectorAll selector
Array::slice.call result
#funks #funks
expandComment = expandComment =