1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 12:55:55 +00:00
* Changed: Added a Hype Train icon to the icon font.
* Changed: The exact loaded version of every add-on is now tracked and logged.
This commit is contained in:
SirStendec 2024-11-07 15:00:13 -05:00
parent a5ba29a153
commit 6f8c20640f
15 changed files with 58 additions and 18 deletions

View file

@ -937,6 +937,20 @@
"search": [
"bits"
]
},
{
"uid": "392cb591c1950cf2b1fa0b2dffbbaf10",
"css": "hype-train",
"code": 59474,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M315.4 42.3H184.6V369.2H53.8V826.9H119.2C119.2 899.1 177.8 957.7 250 957.7 322.2 957.7 380.8 899.1 380.8 826.9H446.2C446.2 899.1 504.7 957.7 576.9 957.7 649.1 957.7 707.7 899.1 707.7 826.9H773.1C773.1 899.1 831.6 957.7 903.8 957.7 976.1 957.7 1034.6 899.1 1034.6 826.9H1100V42.3H511.5V173.1H576.9V369.2H315.4V42.3ZM969.2 696.2L184.6 696.2 184.6 500 969.2 500ZM707.7 369.2L707.7 173.1 969.2 173.1 969.2 369.2Z",
"width": 1154
},
"search": [
"hype-train"
]
}
]
}

View file

@ -1,7 +1,7 @@
{
"name": "frankerfacez",
"author": "Dan Salvato LLC",
"version": "4.75.6",
"version": "4.75.7",
"description": "FrankerFaceZ is a Twitch enhancement suite.",
"private": true,
"license": "Apache-2.0",

Binary file not shown.

View file

@ -170,6 +170,8 @@
<glyph glyph-name="bits" unicode="&#xe851;" d="M500 750l-350-500 350-300 350 300-350 500z m0-174l191-309-191-69-191 69 191 309z" horiz-adv-x="1000" />
<glyph glyph-name="hype-train" unicode="&#xe852;" d="M315 808h-130v-327h-131v-458h65c0-72 59-131 131-131 72 0 131 59 131 131h65c0-72 59-131 131-131 72 0 131 59 131 131h65c0-72 59-131 131-131 72 0 131 59 131 131h65v785h-588v-131h65v-196h-262v327z m654-654l-784 0 0 196 784 0z m-261 327l0 196 261 0 0-196z" horiz-adv-x="1154" />
<glyph glyph-name="move" unicode="&#xf047;" d="M1000 350q0-14-11-25l-142-143q-11-11-26-11t-25 11-10 25v72h-215v-215h72q14 0 25-10t11-25-11-25l-143-143q-10-11-25-11t-25 11l-143 143q-11 10-11 25t11 25 25 10h72v215h-215v-72q0-14-10-25t-25-11-25 11l-143 143q-11 11-11 25t11 25l143 143q10 11 25 11t25-11 10-25v-72h215v215h-72q-14 0-25 10t-11 25 11 26l143 142q11 11 25 11t25-11l143-142q11-11 11-26t-11-25-25-10h-72v-215h215v72q0 14 10 25t25 11 26-11l142-143q11-10 11-25z" horiz-adv-x="1000" />
<glyph glyph-name="link-ext" unicode="&#xf08e;" d="M786 332v-178q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h393q7 0 12-5t5-13v-36q0-8-5-13t-12-5h-393q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v178q0 8 5 13t13 5h36q8 0 13-5t5-13z m214 482v-285q0-15-11-25t-25-11-25 11l-98 98-364-364q-5-6-13-6t-12 6l-64 64q-6 5-6 12t6 13l364 364-98 98q-11 11-11 25t11 25 25 11h285q15 0 25-11t11-25z" horiz-adv-x="1000" />

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -70,6 +70,7 @@ export default class AddonManager extends Module<'addons'> {
addons: Record<string, FullAddonInfo | string[]>;
enabled_addons: string[];
versions: Record<string, string>;
private _loader?: Promise<void>;
@ -90,6 +91,7 @@ export default class AddonManager extends Module<'addons'> {
this.reload_required = false;
this.addons = {};
this.enabled_addons = [];
this.versions = {};
this.load_tracker.schedule('chat-data', 'addon-initial');
}
@ -111,6 +113,7 @@ export default class AddonManager extends Module<'addons'> {
getFFZ: () => this,
isReady: () => this.enabled,
getAddons: () => Object.values(this.addons),
getVersions: () => deep_copy(this.versions),
hasAddon: (id: string) => this.hasAddon(id),
getVersion: (id: string) => this.getVersion(id),
doesAddonTarget: (id: string) => this.doesAddonTarget(id),
@ -178,7 +181,10 @@ export default class AddonManager extends Module<'addons'> {
for(const [id, addon] of Object.entries(this.addons)) {
if ( Array.isArray(addon) )
continue;
out.push(`${id} | ${this.isAddonEnabled(id) ? 'enabled' : 'disabled'} | ${addon.dev ? 'dev | ' : ''}${this.isAddonExternal(id) ? 'external | ' : ''}${addon.short_name} v${addon.version}`);
const version = this.versions[id];
out.push(`${id} | ${this.isAddonEnabled(id) ? 'enabled' : 'disabled'} | ${version ? `${version} | ` : ''}${addon.dev ? 'dev | ' : ''}${this.isAddonExternal(id) ? 'external | ' : ''}${addon.short_name} v${addon.version}`);
}
out.push('');
@ -245,6 +251,10 @@ export default class AddonManager extends Module<'addons'> {
this.emit(':data-loaded');
}
setVersion(addon_id: string, version: string) {
this.versions[addon_id] = version;
}
addAddon(input: BasicAddonInfo, is_dev: boolean = false) {
let addon = input as FullAddonInfo;
@ -286,7 +296,8 @@ export default class AddonManager extends Module<'addons'> {
force_seen: true,
addons: true,
addon: deep_copy(addon),
getFFZ: () => this
getFFZ: () => this,
getVersion: () => this.versions[addon.id]
});
this.emit(':added', addon.id, addon);

View file

@ -16,6 +16,7 @@ import type AddonManager from '../addons';
export class Addon<TPath extends string = '', TEventMap extends ModuleEvents = ModuleEvents> extends Module<TPath, TEventMap> {
static info?: AddonInfo;
static version: string;
// Dependencies
i18n: TranslationManager = null as any;
@ -46,7 +47,7 @@ export class Addon<TPath extends string = '', TEventMap extends ModuleEvents = M
* @param id This add-on's ID, or an {@link AddonInfo} object.
* @param info An optional AddonInfo object if {@link id} was not set to an AddonInfo object.
*/
static register(id?: string | AddonInfo, info?: AddonInfo) {
static register(id?: string | AddonInfo, info?: AddonInfo, version?: string) {
if ( typeof id === 'object' ) {
info = id;
id = info.id || undefined;
@ -62,6 +63,9 @@ export class Addon<TPath extends string = '', TEventMap extends ModuleEvents = M
if ( ! info && this.info )
info = this.info;
if ( version )
this.version = version;
const ffz = window.FrankerFaceZ.get(),
addons = (ffz as any)?.addons as AddonManager;
@ -74,6 +78,9 @@ export class Addon<TPath extends string = '', TEventMap extends ModuleEvents = M
addons.addAddon({
id
});
if ( version )
addons.setVersion(id, version);
}
try {

View file

@ -124,5 +124,6 @@ export default [
"discord",
"tiktok",
"bluesky",
"bits"
"bits",
"hype-train"
] as const;

View file

@ -81,6 +81,7 @@
.ffz-i-discord:before { content: '\e84f'; } /* '' */
.ffz-i-bluesky:before { content: '\e850'; } /* '' */
.ffz-i-bits:before { content: '\e851'; } /* '' */
.ffz-i-hype-train:before { content: '\e852'; } /* '' */
.ffz-i-move:before { content: '\f047'; } /* '' */
.ffz-i-link-ext:before { content: '\f08e'; } /* '' */
.ffz-i-twitter:before { content: '\f099'; } /* '' */

File diff suppressed because one or more lines are too long

View file

@ -81,6 +81,7 @@
.ffz-i-discord { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe84f;&nbsp;'); }
.ffz-i-bluesky { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe850;&nbsp;'); }
.ffz-i-bits { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe851;&nbsp;'); }
.ffz-i-hype-train { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe852;&nbsp;'); }
.ffz-i-move { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf047;&nbsp;'); }
.ffz-i-link-ext { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08e;&nbsp;'); }
.ffz-i-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;&nbsp;'); }

View file

@ -92,6 +92,7 @@
.ffz-i-discord { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe84f;&nbsp;'); }
.ffz-i-bluesky { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe850;&nbsp;'); }
.ffz-i-bits { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe851;&nbsp;'); }
.ffz-i-hype-train { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe852;&nbsp;'); }
.ffz-i-move { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf047;&nbsp;'); }
.ffz-i-link-ext { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08e;&nbsp;'); }
.ffz-i-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;&nbsp;'); }

View file

@ -1,11 +1,11 @@
@font-face {
font-family: 'ffz-fontello';
src: url('../font/ffz-fontello.eot?28778935');
src: url('../font/ffz-fontello.eot?28778935#iefix') format('embedded-opentype'),
url('../font/ffz-fontello.woff2?28778935') format('woff2'),
url('../font/ffz-fontello.woff?28778935') format('woff'),
url('../font/ffz-fontello.ttf?28778935') format('truetype'),
url('../font/ffz-fontello.svg?28778935#ffz-fontello') format('svg');
src: url('../font/ffz-fontello.eot?76975824');
src: url('../font/ffz-fontello.eot?76975824#iefix') format('embedded-opentype'),
url('../font/ffz-fontello.woff2?76975824') format('woff2'),
url('../font/ffz-fontello.woff?76975824') format('woff'),
url('../font/ffz-fontello.ttf?76975824') format('truetype'),
url('../font/ffz-fontello.svg?76975824#ffz-fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'ffz-fontello';
src: url('../font/ffz-fontello.svg?28778935#ffz-fontello') format('svg');
src: url('../font/ffz-fontello.svg?76975824#ffz-fontello') format('svg');
}
}
*/
@ -136,6 +136,7 @@
.ffz-i-discord:before { content: '\e84f'; } /* '' */
.ffz-i-bluesky:before { content: '\e850'; } /* '' */
.ffz-i-bits:before { content: '\e851'; } /* '' */
.ffz-i-hype-train:before { content: '\e852'; } /* '' */
.ffz-i-move:before { content: '\f047'; } /* '' */
.ffz-i-link-ext:before { content: '\f08e'; } /* '' */
.ffz-i-twitter:before { content: '\f099'; } /* '' */