1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-25 20:18:31 +00:00

Add transpiling with Babel so Edge will work.

This commit is contained in:
SirStendec 2018-03-14 14:33:03 -04:00
parent 254d297f79
commit 29a4d8175e
5 changed files with 83 additions and 1 deletions

View file

@ -7,11 +7,12 @@
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/' : '',
FLAVOR = window.Ember ? 'umbral' : 'avalon',
script = document.createElement('script');
script.id = 'ffz-script';
script.src = `${SERVER}/script/${FLAVOR}.js?_=${Date.now()}`;
script.src = `${SERVER}/script/${BABEL}${FLAVOR}.js?_=${Date.now()}`;
document.head.appendChild(script);
})();