mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove old js injection point and apploader script
This commit is contained in:
parent
c38a2e6dd0
commit
2c5e9852bf
2 changed files with 0 additions and 54 deletions
|
@ -155,8 +155,5 @@
|
||||||
<div class="splashLogo"></div>
|
<div class="splashLogo"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mainDrawerHandle"></div>
|
<div class="mainDrawerHandle"></div>
|
||||||
|
|
||||||
<!-- inject:js -->
|
|
||||||
<!-- endinject -->
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
(function() {
|
|
||||||
function injectScriptElement(src, onload) {
|
|
||||||
if (!src) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const script = document.createElement('script');
|
|
||||||
if (window.dashboardVersion) {
|
|
||||||
src += `?v=${window.dashboardVersion}`;
|
|
||||||
}
|
|
||||||
script.src = src;
|
|
||||||
script.setAttribute('async', '');
|
|
||||||
|
|
||||||
if (onload) {
|
|
||||||
script.onload = onload;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.head.appendChild(script);
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadSite() {
|
|
||||||
injectScriptElement(
|
|
||||||
'./libraries/alameda.js',
|
|
||||||
function() {
|
|
||||||
// onload of require library
|
|
||||||
injectScriptElement('./scripts/site.js');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
Promise.resolve();
|
|
||||||
} catch (ex) {
|
|
||||||
// this checks for several cases actually, typical is
|
|
||||||
// Promise() being missing on some legacy browser, and a funky one
|
|
||||||
// is Promise() present but buggy on WebOS 2
|
|
||||||
window.Promise = undefined;
|
|
||||||
/* eslint-disable-next-line no-restricted-globals -- Explicit check on self needed */
|
|
||||||
self.Promise = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!window.Promise) {
|
|
||||||
// Load Promise polyfill if they are not natively supported
|
|
||||||
injectScriptElement(
|
|
||||||
'./libraries/npo.js',
|
|
||||||
loadSite
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
loadSite();
|
|
||||||
}
|
|
||||||
})();
|
|
Loading…
Add table
Add a link
Reference in a new issue