From 2c5e9852bf20868e69e016e27549802138f2840b Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Mon, 23 Nov 2020 01:48:10 -0500 Subject: [PATCH] Remove old js injection point and apploader script --- src/index.html | 3 --- src/scripts/apploader.js | 51 ---------------------------------------- 2 files changed, 54 deletions(-) delete mode 100644 src/scripts/apploader.js diff --git a/src/index.html b/src/index.html index c689a42f30..3edfa0c071 100644 --- a/src/index.html +++ b/src/index.html @@ -155,8 +155,5 @@
- - - diff --git a/src/scripts/apploader.js b/src/scripts/apploader.js deleted file mode 100644 index fdf52fd699..0000000000 --- a/src/scripts/apploader.js +++ /dev/null @@ -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(); - } -})();