diff options
| author | Henry Jameson <me@hjkos.com> | 2018-08-05 05:41:37 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-08-05 05:41:37 +0300 |
| commit | b04a9d1229e1ed35f61634ae25519cfbcb8a2c29 (patch) | |
| tree | 2f39cc68211c40144c08b3cf6d0dcfa1921ed458 /src/services/user_highlighter/user_highlighter.js | |
| parent | 6a81aa274533b6af1f2514508f6f9fa3b0795c9f (diff) | |
cleanup, fixed self-highlighting in notifications, fixed incorrect hex code handling
Diffstat (limited to 'src/services/user_highlighter/user_highlighter.js')
| -rw-r--r-- | src/services/user_highlighter/user_highlighter.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/services/user_highlighter/user_highlighter.js b/src/services/user_highlighter/user_highlighter.js index 31eba2c8..ebb25eca 100644 --- a/src/services/user_highlighter/user_highlighter.js +++ b/src/services/user_highlighter/user_highlighter.js @@ -1,12 +1,10 @@ import { hex2rgb } from '../color_convert/color_convert.js' const highlightStyle = (prefs) => { - if (prefs === undefined) { - return - } + if (prefs === undefined) return const {color, type} = prefs - console.log(arguments) if (typeof color !== 'string') return const rgb = hex2rgb(color) + if (rgb == null) return const solidColor = `rgb(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)})` const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .1)` const tintColor2 = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .2)` |
