mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-30 14:38:31 +00:00
Disabled all styles affecting moderation card when enhanced moderation is off. Disable enhanced moderation when BTTV is detected.
This commit is contained in:
parent
b90a25d794
commit
0f5e3915ad
4 changed files with 35 additions and 27 deletions
12
script.js
12
script.js
|
@ -835,7 +835,8 @@ var FFZ = window.FrankerFaceZ,
|
|||
['12hr', 43200],
|
||||
['24hr', 86400]],
|
||||
|
||||
MESSAGE = '<svg class="svg-messages" height="16px" version="1.1" viewBox="0 0 18 18" width="16px" x="0px" y="0px"><path clip-rule="evenodd" d="M1,15V3h16v12H1z M15.354,5.354l-0.707-0.707L9,10.293L3.354,4.646L2.646,5.354L6.293,9l-3.646,3.646l0.707,0.707L7,9.707l1.646,1.646h0.707L11,9.707l3.646,3.646l0.707-0.707L11.707,9L15.354,5.354z" fill-rule="evenodd"></path></svg>';
|
||||
MESSAGE = '<svg class="svg-messages" height="16px" version="1.1" viewBox="0 0 18 18" width="16px" x="0px" y="0px"><path clip-rule="evenodd" d="M1,15V3h16v12H1z M15.354,5.354l-0.707-0.707L9,10.293L3.354,4.646L2.646,5.354L6.293,9l-3.646,3.646l0.707,0.707L7,9.707l1.646,1.646h0.707L11,9.707l3.646,3.646l0.707-0.707L11.707,9L15.354,5.354z" fill-rule="evenodd"></path></svg>',
|
||||
CHECK = '<svg class="svg-unban" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" y="0px"><path fill-rule="evenodd" clip-rule="evenodd" fill="#888888" d="M6.5,12.75L2,8.25l2-2l2.5,2.5l5.5-5.5l2,2L6.5,12.75z"/></svg>';
|
||||
|
||||
|
||||
// ----------------
|
||||
|
@ -867,15 +868,18 @@ FFZ.prototype.setup_mod_card = function() {
|
|||
didInsertElement: function() {
|
||||
this._super();
|
||||
try {
|
||||
if ( ! f.settings.enhanced_moderation )
|
||||
if ( f.has_bttv || ! f.settings.enhanced_moderation )
|
||||
return;
|
||||
|
||||
var el = this.get('element'),
|
||||
controller = this.get('context');
|
||||
|
||||
// Style it!
|
||||
el.classList.add('ffz-moderation-card');
|
||||
|
||||
// Only do the big stuff if we're mod.
|
||||
if ( controller.get('parentController.model.isModeratorOrHigher') ) {
|
||||
el.classList.add('ffz-moderation-card');
|
||||
el.classList.add('ffz-is-mod');
|
||||
el.setAttribute('tabindex', 1);
|
||||
|
||||
// Key Handling
|
||||
|
@ -947,7 +951,7 @@ FFZ.prototype.setup_mod_card = function() {
|
|||
|
||||
var unban_btn = document.createElement('button');
|
||||
unban_btn.className = 'unban button glyph-only light';
|
||||
unban_btn.innerHTML = "✓";
|
||||
unban_btn.innerHTML = CHECK;
|
||||
unban_btn.title = "(U)nban User";
|
||||
|
||||
jQuery(unban_btn).tipsy();
|
||||
|
|
4
script.min.js
vendored
4
script.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,8 @@ var FFZ = window.FrankerFaceZ,
|
|||
['12hr', 43200],
|
||||
['24hr', 86400]],
|
||||
|
||||
MESSAGE = '<svg class="svg-messages" height="16px" version="1.1" viewBox="0 0 18 18" width="16px" x="0px" y="0px"><path clip-rule="evenodd" d="M1,15V3h16v12H1z M15.354,5.354l-0.707-0.707L9,10.293L3.354,4.646L2.646,5.354L6.293,9l-3.646,3.646l0.707,0.707L7,9.707l1.646,1.646h0.707L11,9.707l3.646,3.646l0.707-0.707L11.707,9L15.354,5.354z" fill-rule="evenodd"></path></svg>';
|
||||
MESSAGE = '<svg class="svg-messages" height="16px" version="1.1" viewBox="0 0 18 18" width="16px" x="0px" y="0px"><path clip-rule="evenodd" d="M1,15V3h16v12H1z M15.354,5.354l-0.707-0.707L9,10.293L3.354,4.646L2.646,5.354L6.293,9l-3.646,3.646l0.707,0.707L7,9.707l1.646,1.646h0.707L11,9.707l3.646,3.646l0.707-0.707L11.707,9L15.354,5.354z" fill-rule="evenodd"></path></svg>',
|
||||
CHECK = '<svg class="svg-unban" height="16px" version="1.1" viewBox="0 0 16 16" width="16px" x="0px" y="0px"><path fill-rule="evenodd" clip-rule="evenodd" fill="#888888" d="M6.5,12.75L2,8.25l2-2l2.5,2.5l5.5-5.5l2,2L6.5,12.75z"/></svg>';
|
||||
|
||||
|
||||
// ----------------
|
||||
|
@ -47,15 +48,18 @@ FFZ.prototype.setup_mod_card = function() {
|
|||
didInsertElement: function() {
|
||||
this._super();
|
||||
try {
|
||||
if ( ! f.settings.enhanced_moderation )
|
||||
if ( f.has_bttv || ! f.settings.enhanced_moderation )
|
||||
return;
|
||||
|
||||
var el = this.get('element'),
|
||||
controller = this.get('context');
|
||||
|
||||
// Style it!
|
||||
el.classList.add('ffz-moderation-card');
|
||||
|
||||
// Only do the big stuff if we're mod.
|
||||
if ( controller.get('parentController.model.isModeratorOrHigher') ) {
|
||||
el.classList.add('ffz-moderation-card');
|
||||
el.classList.add('ffz-is-mod');
|
||||
el.setAttribute('tabindex', 1);
|
||||
|
||||
// Key Handling
|
||||
|
@ -127,7 +131,7 @@ FFZ.prototype.setup_mod_card = function() {
|
|||
|
||||
var unban_btn = document.createElement('button');
|
||||
unban_btn.className = 'unban button glyph-only light';
|
||||
unban_btn.innerHTML = "✓";
|
||||
unban_btn.innerHTML = CHECK;
|
||||
unban_btn.title = "(U)nban User";
|
||||
|
||||
jQuery(unban_btn).tipsy();
|
||||
|
|
34
style.css
34
style.css
|
@ -432,44 +432,44 @@
|
|||
|
||||
/* Fix Moderation Cards */
|
||||
|
||||
.ember-chat .moderation-card {
|
||||
.ember-chat .ffz-moderation-card {
|
||||
box-shadow: #808080 0 0 5px;
|
||||
}
|
||||
|
||||
.ember-chat .moderation-card button {
|
||||
.ember-chat .ffz-moderation-card button {
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.ember-chat .moderation-card button:not(.glyph-only):hover,
|
||||
.ember-chat .moderation-card button:not(.glyph-only):focus {
|
||||
.ember-chat .ffz-moderation-card button:not(.glyph-only):hover,
|
||||
.ember-chat .ffz-moderation-card button:not(.glyph-only):focus {
|
||||
color: #fff;
|
||||
background-color: rgba(117,80,186, 1);
|
||||
}
|
||||
|
||||
.ember-chat .moderation-card button.message {
|
||||
.ember-chat .ffz-moderation-card button.message {
|
||||
height: 30px; width: 28px;
|
||||
}
|
||||
|
||||
.ember-chat .ffz-moderation-card .interface .mod-controls:last-of-type,
|
||||
.ember-chat .moderation-card .interface span.right {
|
||||
.ember-chat .ffz-moderation-card.ffz-is-mod .interface .mod-controls:last-of-type,
|
||||
.ember-chat .ffz-moderation-card .interface span.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.ember-chat .moderation-card:focus {
|
||||
.ember-chat .ffz-moderation-card:focus {
|
||||
outline: none;
|
||||
box-shadow: #000 0 0 5px;
|
||||
}
|
||||
|
||||
.ember-chat-container.dark .ember-chat .moderation-card:focus,
|
||||
.chat-container.dark .ember-chat .moderation-card:focus,
|
||||
.app-main.theatre .ember-chat .moderation-card:focus {
|
||||
.ember-chat-container.dark .ember-chat .ffz-moderation-card:focus,
|
||||
.chat-container.dark .ember-chat .ffz-moderation-card:focus,
|
||||
.app-main.theatre .ember-chat .ffz-moderation-card:focus {
|
||||
box-shadow: #fff 0 0 5px;
|
||||
}
|
||||
|
||||
.ember-chat-container.dark .ember-chat .moderation-card .interface,
|
||||
.chat-container.dark .ember-chat .moderation-card .interface,
|
||||
.app-main.theatre .ember-chat .moderation-card .interface {
|
||||
.ember-chat-container.dark .ember-chat .ffz-moderation-card .interface,
|
||||
.chat-container.dark .ember-chat .ffz-moderation-card .interface,
|
||||
.app-main.theatre .ember-chat .ffz-moderation-card .interface {
|
||||
background-color: #232329;
|
||||
}
|
||||
|
||||
|
@ -478,16 +478,16 @@
|
|||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.ember-chat .moderation-card .interface {
|
||||
.ember-chat .ffz-moderation-card .interface {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.ember-chat .moderation-card h3.name {
|
||||
.ember-chat .ffz-moderation-card h3.name {
|
||||
display: inline-block;
|
||||
text-shadow: black 0 0 5px;
|
||||
}
|
||||
|
||||
.ember-chat .moderation-card .channel_background {
|
||||
.ember-chat .ffz-moderation-card .channel_background {
|
||||
width: 100%;
|
||||
top: 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue