From 691f3e89d7b04bfc15023e4e38c7e7b6f47bf258 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sat, 4 Jan 2014 14:52:04 -0700 Subject: [PATCH] Small optimization --- builds/appchan-x.user.js | 6 ++---- builds/crx/script.js | 6 ++---- src/Theming/Rice.coffee | 1 + 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index ee6083dab..85efaadf5 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -13063,14 +13063,12 @@ var fn; root || (root = d.body); fn = function(items, type) { - var func, item, _i, _len, _results; + var func, item, _i, _len; func = Rice[type]; - _results = []; for (_i = 0, _len = items.length; _i < _len; _i++) { item = items[_i]; - _results.push(func(item)); + func(item); } - return _results; }; fn($$('[type=checkbox]:not(.riced)', root), 'checkbox'); return fn($$('select:not(.riced)', root), 'select'); diff --git a/builds/crx/script.js b/builds/crx/script.js index 6d80bdae6..068d6095a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -13068,14 +13068,12 @@ var fn; root || (root = d.body); fn = function(items, type) { - var func, item, _i, _len, _results; + var func, item, _i, _len; func = Rice[type]; - _results = []; for (_i = 0, _len = items.length; _i < _len; _i++) { item = items[_i]; - _results.push(func(item)); + func(item); } - return _results; }; fn($$('[type=checkbox]:not(.riced)', root), 'checkbox'); return fn($$('select:not(.riced)', root), 'select'); diff --git a/src/Theming/Rice.coffee b/src/Theming/Rice.coffee index 07a105137..93ac1b4d1 100644 --- a/src/Theming/Rice.coffee +++ b/src/Theming/Rice.coffee @@ -68,6 +68,7 @@ Rice = fn = (items, type) -> func = Rice[type] func item for item in items + return fn $$('[type=checkbox]:not(.riced)', root), 'checkbox' fn $$('select:not(.riced)', root), 'select'