mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-10-13 22:41:57 +00:00
Add favorite emotes. Add emote menu sorting. Use a CSS variable for border colors for chat lines. Use fixed emote images for the emote menu.
This commit is contained in:
parent
a01b21e9d9
commit
1841ab156c
13 changed files with 450 additions and 99 deletions
|
@ -1,7 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
import {has} from 'utilities/object';
|
||||
|
||||
export function hue2rgb(p, q, t) {
|
||||
if ( t < 0 ) t += 1;
|
||||
if ( t > 1 ) t -= 1;
|
||||
|
@ -565,7 +563,7 @@ export class ColorAdjuster {
|
|||
|
||||
|
||||
rebuildContrast() {
|
||||
this._cache = {};
|
||||
this._cache = new Map;
|
||||
|
||||
const base = RGBAColor.fromCSS(this._base),
|
||||
lum = base.luminance();
|
||||
|
@ -606,8 +604,8 @@ export class ColorAdjuster {
|
|||
if ( ! color )
|
||||
return null;
|
||||
|
||||
if ( has(this._cache, color) )
|
||||
return this._cache[color];
|
||||
if ( this._cache.has(color) )
|
||||
return this._cache.get(color);
|
||||
|
||||
let rgb = RGBAColor.fromCSS(color);
|
||||
|
||||
|
@ -650,7 +648,8 @@ export class ColorAdjuster {
|
|||
rgb = rgb.brighten(-1);
|
||||
}
|
||||
|
||||
const out = this._cache[color] = rgb.toHex();
|
||||
const out = rgb.toHex();
|
||||
this._cache.set(color, out);
|
||||
return out;
|
||||
}
|
||||
}
|
|
@ -33,6 +33,25 @@ export const KNOWN_CODES = {
|
|||
'Gr(a|e)yFace': 'GrayFace'
|
||||
};
|
||||
|
||||
export const REPLACEMENT_BASE = '//cdn.frankerfacez.com/script/replacements/';
|
||||
|
||||
export const REPLACEMENTS = {
|
||||
15: '15-JKanStyle.png',
|
||||
16: '16-OptimizePrime.png',
|
||||
17: '17-StoneLightning.png',
|
||||
18: '18-TheRinger.png',
|
||||
//19: '19-PazPazowitz.png',
|
||||
//20: '20-EagleEye.png',
|
||||
//21: '21-CougarHunt.png',
|
||||
22: '22-RedCoat.png',
|
||||
26: '26-JonCarnage.png',
|
||||
//27: '27-PicoMause.png',
|
||||
30: '30-BCWarrior.png',
|
||||
33: '33-DansGame.png',
|
||||
36: '36-PJSalt.png'
|
||||
};
|
||||
|
||||
|
||||
export const WS_CLUSTERS = {
|
||||
Production: [
|
||||
['wss://catbag.frankerfacez.com/', 0.25],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue