diff --git a/4chan_x.js b/4chan_x.js index 095d6c0bb..b611066bd 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -434,12 +434,10 @@ }); } $$ = function(selector, root) { - var result; if (root == null) { root = d.body; } - result = root.querySelectorAll(selector); - return Array.prototype.slice.call(result); + return Array.prototype.slice.call(root.querySelectorAll(selector)); }; expandComment = { init: function() { diff --git a/script.coffee b/script.coffee index 276284e23..21927eb33 100644 --- a/script.coffee +++ b/script.coffee @@ -299,8 +299,7 @@ else localStorage[name] = JSON.stringify value $$ = (selector, root=d.body) -> - result = root.querySelectorAll selector - Array::slice.call result + Array::slice.call root.querySelectorAll selector #funks expandComment =