diff --git a/changelog.html b/changelog.html index 75c608a0..7897095e 100644 --- a/changelog.html +++ b/changelog.html @@ -1,3 +1,55 @@ +
Chat Appearance > Enable Custom Badge Images
setting that can be used to disable custom mod badges for channels.Chat Appearance > Old-Style Subscriber Notices
enabled.room-recent-highlights
event even if the Recent Highlights feature is disabled.room-recent-highlights
event for triggering behaviors when new highlighted messages are displayed.room-message
API event.AUTOMOD_SMALLER
experiment. In-Line AutoMod is not yet working when you are part of that experiment.user-emotes
service in all places since tmiSession
's emote parser has been removed.Chat Filtering > Remove Messages from Moderators
.Chat Filtering > Remove Messages from Moderators
.' + TB_TOOLTIP + '
' + - ''; + if ( ! this.get('isAutoModPromptSmaller') ) + return '' + TB_TOOLTIP + '
' + + ''; + + var line = f._build_mod_card_history(this.get('msgObject.autoModRejectedMsgObject'), null, true, null, null, false); + line.classList.add('mg-y-05'); + + return ' Allow will post it to chat.' + + '' + + '' + + line.outerHTML; }, ffzRender: function() { @@ -1210,7 +1222,7 @@ FFZ.prototype._modify_chat_line = function(component, is_vod) { this.buildDeletedMessageHTML() : this.buildMessageHTML(); } - if ( ! f.settings.automod_inline && this.get('msgObject.autoModRejected') ) + if ( (this.get('isAutoModPromptSmaller') || ! f.settings.automod_inline) && this.get('msgObject.autoModRejected') ) output += this.buildAutoModHTML(); el.innerHTML = output; @@ -1513,11 +1525,10 @@ FFZ.prototype._modify_chat_subline = function(component, is_whisper) { return; else if ( (f.settings.clickable_mentions && cl.contains('user-token')) || cl.contains('from') || cl.contains('to') || e.target.parentElement.classList.contains('from') || e.target.parentElement.classList.contains('to') ) { - var target = cl.contains('user-token') ? - e.target.getAttribute('data-user') : - (cl.contains('from') || e.target.parentElement.classList.contains('from')) ? + var target = e.target.getAttribute('data-user') || + ((cl.contains('from') || e.target.parentElement.classList.contains('from')) ? from : - this.get('msgObject.to'); + this.get('msgObject.to')); if ( ! target ) return; diff --git a/src/ember/moderation-card.js b/src/ember/moderation-card.js index 3205e8ea..42a9cf3c 100644 --- a/src/ember/moderation-card.js +++ b/src/ember/moderation-card.js @@ -699,7 +699,9 @@ FFZ.prototype.modify_moderation_card = function(component) { var chat = utils.ember_lookup('controller:chat'), room_id = chat && chat.get('currentRoom.id'), - user_id = this.get('cardInfo.user.id'); + user_id = this.get('cardInfo.user.id'), + user = f.get_user(), + is_me = user && user.login === user_id; if (( this._lv_sock_room && this._lv_sock_room !== room_id ) || (this._lv_sock_user && this._lv_sock_user !== user_id) ) { f.lv_ws_unsub('logs-' + this._lv_sock_room + '-' + this._lv_sock_user); @@ -710,6 +712,8 @@ FFZ.prototype.modify_moderation_card = function(component) { if ( f.settings.mod_card_history ) this.ffzRenderHistory(); + Ember.run.next(this.ffzFixDefaultActions.bind(this)); + // Highlight this user's chat messages. if ( f.settings.highlight_messages_with_mod_card ) utils.update_css(f._chat_style, 'mod-card-highlight', styles['chat-user-bg'].replace(/{user_id}/g, this.get('cardInfo.user.id'))); @@ -950,6 +954,334 @@ FFZ.prototype.modify_moderation_card = function(component) { utils.update_css(f._chat_style, 'mod-card-highlight'); }, + ffzFixDefaultActions: function() { + var el = this.get('element'), + t = this, + line, + + is_mod = t.get('cardInfo.isModeratorOrHigher'), + ban_reasons, + + chat = utils.ember_lookup('controller:chat'), + user = f.get_user(), + room = chat && chat.get('currentRoom'), + room_id = room && room.get('id'), + ffz_room = f.rooms && f.rooms[room_id] || {}, + is_broadcaster = user && room_id === user.login, + + user_id = this.get('cardInfo.user.id'), + is_me = user && user.login === user_id, + alias = f.aliases[user_id], + + handle_key, + + ban_reason = function() { + return ban_reasons && ban_reasons.value ? ' ' + ban_reasons.value : ""; + }, + + alias_btn = utils.createElement('button', 'alias button float-left button--icon-only html-tooltip'); + + alias_btn.innerHTML = '