From 18e3569194b16f53ac23646725c92803f229e090 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Wed, 3 Jul 2013 02:04:49 -0700 Subject: [PATCH] Meh, really --- builds/appchan-x.user.js | 3 ++- builds/crx/script.js | 3 ++- src/Theming/Style.coffee | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 56c0eec46..e60f7d4d3 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -11524,8 +11524,9 @@ g: parseInt(bgHex.substr(2, 2), 16) / 255, b: parseInt(bgHex.substr(4, 2), 16) / 255 }; + return [fg, bg]; } - return [fg, bg || fg]; + return [fg]; }, filter: function(_arg) { var bg, fg; diff --git a/builds/crx/script.js b/builds/crx/script.js index d8ea706ad..7959c53ad 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -11513,8 +11513,9 @@ g: parseInt(bgHex.substr(2, 2), 16) / 255, b: parseInt(bgHex.substr(4, 2), 16) / 255 }; + return [fg, bg]; } - return [fg, bg || fg]; + return [fg]; }, filter: function(_arg) { var bg, fg; diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index 4364e3c28..18bfc0090 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -126,11 +126,13 @@ Style = matrix: (foreground, background) -> fgHex = Style.colorToHex foreground + fg = { r: parseInt(fgHex.substr(0, 2), 16) / 255 g: parseInt(fgHex.substr(2, 2), 16) / 255 b: parseInt(fgHex.substr(4, 2), 16) / 255 } + if background bgHex = Style.colorToHex background @@ -140,7 +142,9 @@ Style = b: parseInt(bgHex.substr(4, 2), 16) / 255 } - [fg, bg or fg] + return [fg, bg] + + [fg] filter: ([fg, bg]) -> "#{bg.r} #{-fg.r} 0 0 #{fg.r} #{bg.g} #{-fg.g} 0 0 #{fg.g} #{bg.b} #{-fg.b} 0 0 #{fg.b}"