From 3540e6a5ca6c2bbc59f32afe2df44aaa75703852 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 7 May 2011 18:55:21 -0700 Subject: [PATCH] one-liner --- 4chan_x.js | 4 +--- script.coffee | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) 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 =