diff options
author | Evan Prodromou <evan@status.net> | 2009-08-27 14:52:32 -0700 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-08-27 14:52:32 -0700 |
commit | a08c76a4342cfb4b3d772f6880ba0b8f3153b246 (patch) | |
tree | e2ba9ef2f670d01cf700a732d36050fe3ce63774 /js | |
parent | 522008dee570aafcc844bf123d25203c7d9c3ebc (diff) | |
parent | eb667d09d9c6ef5a1465a5f8d824661a9387a4da (diff) |
Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x
Conflicts:
classes/laconica.ini
Diffstat (limited to 'js')
-rw-r--r-- | js/userdesign.go.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/userdesign.go.js b/js/userdesign.go.js index 18f72f96a..eb4dece09 100644 --- a/js/userdesign.go.js +++ b/js/userdesign.go.js @@ -27,11 +27,12 @@ $(document).ready(function() { } } - /* rgb2hex written by R0bb13 <robertorebollo@gmail.com> */ function rgb2hex(rgb) { + if (rgb.slice(0,1) == '#') { return rgb; } rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); return '#' + dec2hex(rgb[1]) + dec2hex(rgb[2]) + dec2hex(rgb[3]); } + /* dec2hex written by R0bb13 <robertorebollo@gmail.com> */ function dec2hex(x) { hexDigits = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); return isNaN(x) ? '00' : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16]; |