From 96338ebe0b32a18f5ba06e834a317ab7f86313cb Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 12 Jan 2014 14:59:44 -0700 Subject: [PATCH] Some empty select is causing issues, so I'm not gonna bother with it --- builds/appchan-x.user.js | 4 ++-- builds/crx/script.js | 4 ++-- src/Theming/Rice.coffee | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 0abfdff5a..dc0cb40ec 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -13475,11 +13475,11 @@ return $.on(div, 'click', Rice.cb.check); }, select: function(select) { - var div; + var div, _ref; $.addClass(select, 'riced'); div = $.el('div', { className: 'selectrice', - innerHTML: "
" + (select.options[select.selectedIndex || '0'].textContent || '') + "
" + innerHTML: "
" + (((_ref = select.options[select.selectedIndex || '0']) != null ? _ref.textContent : void 0) || '') + "
" }); $.on(div, "click", Rice.cb.select); return $.after(select, div); diff --git a/builds/crx/script.js b/builds/crx/script.js index 83bdf7610..7a06ff71a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -13465,11 +13465,11 @@ return $.on(div, 'click', Rice.cb.check); }, select: function(select) { - var div; + var div, _ref; $.addClass(select, 'riced'); div = $.el('div', { className: 'selectrice', - innerHTML: "
" + (select.options[select.selectedIndex || '0'].textContent || '') + "
" + innerHTML: "
" + (((_ref = select.options[select.selectedIndex || '0']) != null ? _ref.textContent : void 0) || '') + "
" }); $.on(div, "click", Rice.cb.select); return $.after(select, div); diff --git a/src/Theming/Rice.coffee b/src/Theming/Rice.coffee index 93ac1b4d1..47ddac4f7 100644 --- a/src/Theming/Rice.coffee +++ b/src/Theming/Rice.coffee @@ -88,7 +88,7 @@ Rice = $.addClass select, 'riced' div = $.el 'div', className: 'selectrice' - innerHTML: "
#{select.options[select.selectedIndex or '0'].textContent or ''}
" + innerHTML: "
#{select.options[select.selectedIndex or '0']?.textContent or ''}
" $.on div, "click", Rice.cb.select $.after select, div \ No newline at end of file