mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
* Added: "Copy Message" chat action for copying a message to your clipboard. * Added: Setting to pause the player by clicking on it. This is disabled by default, and the pause happens after half a second to avoid pausing as part of a double-click. * Added: Setting to clear the emote menu's search when closing it. * Added: Setting to hide the "Elevate Your Message" button in the chat input field. * Changed: Remove code related to channel hosting. * Fixed: Do not attempt to load FFZ on `gql` or `passport` subdomains. * Fixed: Channel leader-boards not being hidden on channels within a specific experiment.
26 lines
No EOL
873 B
JavaScript
26 lines
No EOL
873 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;
|
|
|
|
const DEBUG = localStorage.ffzDebugMode == 'true' && document.body.classList.contains('ffz-dev'),
|
|
HOST = location.hostname,
|
|
SERVER = DEBUG ? '//localhost:8000' : '//cdn.frankerfacez.com',
|
|
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}/script/${FLAVOR}.js?_=${Date.now()}`;
|
|
document.head.appendChild(script);
|
|
})(); |