1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-06 06:10:54 +00:00
FrankerFaceZ/src/entry.js
SirStendec 154a587c87 4.0.0-rc8.5
* Added: Separate setting for hiding the Get Bits button in the site header without hiding the bits UI in chat.
* Added: Setting to hide avatars in the side navigation bar.
* Fixed: Do not inject FFZ into the Extension Testing Rig.
2018-07-24 13:52:11 -04:00

21 lines
No EOL
806 B
JavaScript

/* eslint strict: off */
'use strict';
(() => {
// Don't run on certain sub-domains.
if ( /^(?:localhost\.rig|blog|player|im|chatdepot|tmi|api|)\./.test(location.hostname) )
return;
const DEBUG = localStorage.ffzDebugMode == 'true' && document.body.classList.contains('ffz-dev') && ! window.Ember,
SERVER = DEBUG ? '//localhost:8000' : '//cdn.frankerfacez.com',
BABEL = /Edge/.test(window.navigator.userAgent) ? 'babel/' : '',
CLIPS = /clips\.twitch\.tv/.test(location.hostname) ? 'clips/' : '',
FLAVOR = window.Ember ? 'umbral' : 'avalon',
script = document.createElement('script');
script.id = 'ffz-script';
script.async = true;
script.crossOrigin = 'anonymous';
script.src = `${SERVER}/script/${CLIPS}${BABEL}${FLAVOR}.js?_=${Date.now()}`;
document.head.appendChild(script);
})();