Open justinb01981 opened 8 years ago
Bump?
We can't merge this in @justinb01981, it's a possible XSS vector :(
Gotcha. If I modified the code to disallow writing CSS directly and instead only manipulate the background-image URL/color based on some selections, would that work?
@justinb01981 What you have is a really neat feature, but we're a little hesitant to merge it in :(
How about something lighter like an accent/theme color per room?
https://github.com/justinb01981/lets-chat-custom-css-style
I've done some work to add an attribute to each room that contains some custom cssText (stylesheet) data that gets injected when the room renders. Its editable from the room-edit dialog, under "Custom Style".
An example to load a background image that spans the chat window, and lower the opacity of the messages in front of it...:
.lcb-room-chat { background-image:url("http://www.domain17.net/NeonLightSm.JPG"); background-size:90%; background-repeat:no-repeat; } /* lower opacity of messages so we can see background */ .lcb-messages { opacity:0.8; color:red;
}
My branch is here, and I think the changes necessary are fairly straightforward, but if there is some more work I could do to make it more acceptable for upstream inclusion, I'd like to try and do that.
https://github.com/justinb01981/lets-chat-custom-css-style