mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-05 22:00:54 +00:00
* Added: When searching in the FFZ Control Center, you can now use the tag `@modified` to filter by settings that have been changed in the current profile. * Added: Add-ons now have Changelog buttons that navigate to a changelog showing only entries for that add-on. * Changed: The Changelog pages now has nicer formatting for each commit, including add-on icons and clickable links to add-on sub-pages when viewing the Add-on Changelog. * API Added: To prevent FrankerFaceZ from loading into a page, include `disable_frankerfacez` in the URL query parameters. * Experiment Changed: Fix incorrect roll-out percentage for API-Based Link Lookups. This should be fully enabled. * Experiment Changed: Lower the percentage of users in the MQTT-Based PubSub experiment.
32 lines
899 B
JavaScript
32 lines
899 B
JavaScript
/* eslint strict: off */
|
|
'use strict';
|
|
(() => {
|
|
// Don't run on certain sub-domains.
|
|
if ( /^(?:localhost\.rig|blog|im|chatdepot|tmi|api|brand|dev|gql|passport)\./.test(location.hostname) )
|
|
return;
|
|
|
|
if ( /disable_frankerfacez/.test(location.search) )
|
|
return;
|
|
|
|
const browser = globalThis.browser ?? globalThis.chrome,
|
|
|
|
HOST = location.hostname,
|
|
SERVER = browser.runtime.getURL("web"),
|
|
script = document.createElement('script');
|
|
|
|
let FLAVOR =
|
|
HOST.includes('player') ? 'player' :
|
|
HOST.includes('clips') ? 'clips' :
|
|
(location.pathname === '/p/ffz_bridge/' ? 'bridge' : 'avalon');
|
|
|
|
if (FLAVOR === 'clips' && location.pathname === '/embed')
|
|
FLAVOR = 'player';
|
|
|
|
script.id = 'ffz-script';
|
|
script.async = true;
|
|
script.crossOrigin = 'anonymous';
|
|
script.src = `${SERVER}/${FLAVOR}.js?_=${Date.now()}`;
|
|
script.dataset.path = SERVER;
|
|
|
|
document.head.appendChild(script);
|
|
})();
|