Remove old js injection point and apploader script

This commit is contained in:
Bill Thornton 2020-11-23 01:48:10 -05:00
parent c38a2e6dd0
commit 2c5e9852bf
2 changed files with 0 additions and 54 deletions

View file

@ -155,8 +155,5 @@
<div class="splashLogo"></div>
</div>
<div class="mainDrawerHandle"></div>
<!-- inject:js -->
<!-- endinject -->
</body>
</html>

View file

@ -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();
}
})();