diff options
author | Charlie DeTar <cfd@media.mit.edu> | 2012-09-17 00:19:57 -0400 |
---|---|---|
committer | Charlie DeTar <cfd@media.mit.edu> | 2012-09-17 00:19:57 -0400 |
commit | bc6e495e8c691a3e3ce047b1dbe8ba600ef49eef (patch) | |
tree | be9bc36bee7f5f874d0b5249407e8141339da282 /src/static/js | |
parent | afc90604bfad7ab5805873cb5bafc3bbb74c4b01 (diff) | |
download | etherpad-lite-bc6e495e8c691a3e3ce047b1dbe8ba600ef49eef.zip |
Use 'transparent' as reference to validate css
Use 'transparent' instead of 'white' as a reference color for validating
CSS color values. Presumably, a user setting a userColor wants some
color other than 'transparent' if they are setting it (they could always
duplicate the background's color if not).
Diffstat (limited to 'src/static/js')
-rw-r--r-- | src/static/js/pad.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 8f8e8729..3e2663c8 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -164,7 +164,7 @@ function getParams() settings.globalUserName = decodeURIComponent(userName); } if(userColor) - // If the userColor is set as a parameter, set a global value to use once we have initiated hte pad. + // If the userColor is set as a parameter, set a global value to use once we have initiated the pad. { settings.globalUserColor = decodeURIComponent(userColor); } @@ -372,12 +372,12 @@ function handshake() if (settings.globalUserColor !== false) { // First, check the color to ensure it's a valid css color value. - var check = $("<span/>").css("background-color", "white"); + var check = $("<span/>").css("background-color", "transparent"); $("body").append(check); - var white = check.css("background-color"); + var transparent = check.css("background-color"); check.css("background-color", settings.globalUserColor); // Ensure that setting the element changed the color. - if (check.css("background-color") === white) { + if (check.css("background-color") === transparent) { settings.globalUserColor = "#ff0000"; } check.remove(); |