mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 18:06:55 +00:00
4.17.3
* Added: High-DPI badge support for Firefox using `@media` queries since they still don't support `image-set()` after 5+ years. * Added: Display the date videos were uploaded in a tool-tip when hovering over the human readable duration (such as '3 months ago'). * Added: Setting to hide all the Community Highlight pop-ups at the top of chat. They are the latest pop-up style Twitch is trying. As usual, they fail to include a way to dismiss them and they obscure chat. Unfortunately, this also hides polls which have some value. * Fixed: Inverted Portrait Mode.
This commit is contained in:
parent
3616027441
commit
5f8ebc9085
7 changed files with 123 additions and 18 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
import User from './user';
|
||||
|
||||
import {NEW_API, API_SERVER, WEBKIT_CSS as WEBKIT} from 'utilities/constants';
|
||||
import {NEW_API, API_SERVER, WEBKIT_CSS as WEBKIT, IS_FIREFOX} from 'utilities/constants';
|
||||
|
||||
import {ManagedStyle} from 'utilities/dom';
|
||||
import {has, SourcedSet, set_equals} from 'utilities/object';
|
||||
|
@ -445,7 +445,8 @@ export default class Room {
|
|||
if ( ! this.badges )
|
||||
return this.style.delete('badges');
|
||||
|
||||
const out = [],
|
||||
const use_media = IS_FIREFOX && this.manager.context.get('chat.badges.media-queries'),
|
||||
out = [],
|
||||
id = this.id;
|
||||
|
||||
for(const key in this.badges)
|
||||
|
@ -454,9 +455,9 @@ export default class Room {
|
|||
for(const version in versions)
|
||||
if ( has(versions, version) ) {
|
||||
const data = versions[version],
|
||||
rule = `.ffz-badge[data-badge="${key}"][data-version="${version}"]`;
|
||||
selector = `[data-room-id="${id}"] .ffz-badge[data-badge="${key}"][data-version="${version}"]`;
|
||||
|
||||
out.push(`[data-room-id="${id}"] ${rule} {
|
||||
out.push(`${selector} {
|
||||
background-color: transparent;
|
||||
filter: none;
|
||||
${WEBKIT}mask-image: none;
|
||||
|
@ -470,6 +471,15 @@ export default class Room {
|
|||
url("${data.image4x}") 4x
|
||||
);
|
||||
}`);
|
||||
|
||||
if ( use_media ) {
|
||||
out.push(`@media (min-resolution: 100dpi) and (max-resolution:199dpi) { ${selector} {
|
||||
background-image: url("${data.image2x}");
|
||||
}}`);
|
||||
out.push(`@media (min-resolution: 200dpi) { ${selector} {
|
||||
background-image: url("${data.image4x}");
|
||||
}}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue