diff --git a/4chan_x.js b/4chan_x.js index dd7eac8e0..43f51e541 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -433,17 +433,12 @@ }); } $$ = function(selector, root) { - var node, result, _i, _len, _results; + var result; if (root == null) { root = d.body; } result = root.querySelectorAll(selector); - _results = []; - for (_i = 0, _len = result.length; _i < _len; _i++) { - node = result[_i]; - _results.push(node); - } - return _results; + return Array.prototype.slice.call(result); }; expandComment = { init: function() { diff --git a/script.coffee b/script.coffee index 0e856e52b..ca2f6d56d 100644 --- a/script.coffee +++ b/script.coffee @@ -299,7 +299,7 @@ else $$ = (selector, root=d.body) -> result = root.querySelectorAll selector - node for node in result + Array::slice.call result #funks expandComment =