summaryrefslogtreecommitdiffstats
path: root/web_src/js/publicpath.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-05-20 05:28:59 +0200
committerGitHub <noreply@github.com>2020-05-19 23:28:59 -0400
commit34e6a4e05734a642883037ba1a9f78750c1a0583 (patch)
tree02f05d48cc76b6cfecb3e3adaf7d91554f8a0364 /web_src/js/publicpath.js
parent6da87eda8bcfca49a008c07f7e3cff001df921bf (diff)
downloadgitea-34e6a4e05734a642883037ba1a9f78750c1a0583.tar.gz
gitea-34e6a4e05734a642883037ba1a9f78750c1a0583.zip
Remove IE11 support (#11470)
* Remove IE11 support With master now on 1.13, it's time to drop IE11 for good. The woff variants are also in use by Opera Mini but it has even less market share and I can only imagine how broken the UI is in it. Fixes: https://github.com/go-gitea/gitea/issues/6147 * update docs Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src/js/publicpath.js')
-rw-r--r--web_src/js/publicpath.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/web_src/js/publicpath.js b/web_src/js/publicpath.js
index 392c03e700..892bb459aa 100644
--- a/web_src/js/publicpath.js
+++ b/web_src/js/publicpath.js
@@ -1,11 +1,5 @@
// This sets up webpack's chunk loading to load resources from the 'public'
// directory. This file must be imported before any lazy-loading is being attempted.
-if (document.currentScript && document.currentScript.src) {
- const url = new URL(document.currentScript.src);
- __webpack_public_path__ = url.pathname.replace(/\/[^/]*?\/[^/]*?$/, '/');
-} else {
- // compat: IE11
- const script = document.querySelector('script[src*="/index.js"]');
- __webpack_public_path__ = script.getAttribute('src').replace(/\/[^/]*?\/[^/]*?$/, '/');
-}
+const url = new URL(document.currentScript.src);
+__webpack_public_path__ = url.pathname.replace(/\/[^/]*?\/[^/]*?$/, '/');