Fix #340; add shadowchat option for moderators
The new option allows moderators to see what shadowmuted users are saying. When enabled, messages from shadowmuted users will appear in a darker (or lighter, depending on theme) font and struck through.
This commit is contained in:
parent
37db972d86
commit
42e590c6fd
9 changed files with 43 additions and 8 deletions
|
|
@ -134,7 +134,8 @@ var USEROPTS = {
|
|||
default_quality : getOrDefault("default_quality", ""),
|
||||
boop : getOrDefault("boop", false),
|
||||
secure_connection : getOrDefault("secure_connection", false),
|
||||
no_h264 : getOrDefault("no_h264", default_noh264())
|
||||
no_h264 : getOrDefault("no_h264", default_noh264()),
|
||||
show_shadowchat : getOrDefault("show_shadowchat", false)
|
||||
};
|
||||
|
||||
var VOLUME = parseFloat(getOrDefault("volume", 1));
|
||||
|
|
|
|||
|
|
@ -616,6 +616,7 @@ function showUserOptions() {
|
|||
|
||||
$("#us-modflair").prop("checked", USEROPTS.modhat);
|
||||
$("#us-joinmessage").prop("checked", USEROPTS.joinmessage);
|
||||
$("#us-shadowchat").prop("checked", USEROPTS.show_shadowchat);
|
||||
|
||||
$("a[href='#us-general']").click();
|
||||
$("#useroptions").modal();
|
||||
|
|
@ -648,6 +649,7 @@ function saveUserOptions() {
|
|||
if (CLIENT.rank >= 2) {
|
||||
USEROPTS.modhat = $("#us-modflair").prop("checked");
|
||||
USEROPTS.joinmessage = $("#us-joinmessage").prop("checked");
|
||||
USEROPTS.show_shadowchat = $("#us-shadowchat").prop("checked");
|
||||
}
|
||||
|
||||
storeOpts();
|
||||
|
|
@ -1357,6 +1359,9 @@ function formatChatMessage(data, last) {
|
|||
if (data.meta.addClass) {
|
||||
message.addClass(data.meta.addClass);
|
||||
}
|
||||
if (data.meta.shadow) {
|
||||
div.addClass("chat-shadow");
|
||||
}
|
||||
return div;
|
||||
}
|
||||
|
||||
|
|
@ -1364,6 +1369,9 @@ function addChatMessage(data) {
|
|||
if(IGNORED.indexOf(data.username) !== -1) {
|
||||
return;
|
||||
}
|
||||
if (data.meta.shadow && !USEROPTS.show_shadowchat) {
|
||||
return;
|
||||
}
|
||||
var div = formatChatMessage(data, LASTCHAT);
|
||||
// Incoming: a bunch of crap for the feature where if you hover over
|
||||
// a message, it highlights messages from that user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue