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:
parent
254d297f79
commit
29a4d8175e
5 changed files with 83 additions and 1 deletions
|
@ -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);
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue