aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/index.js1
-rw-r--r--web_src/js/polyfills.js17
-rw-r--r--web_src/js/publicpath.js10
3 files changed, 2 insertions, 26 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index b808812372..af1c4acd46 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -3,7 +3,6 @@
/* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */
import './publicpath.js';
-import './polyfills.js';
import Vue from 'vue';
import 'jquery.are-you-sure';
diff --git a/web_src/js/polyfills.js b/web_src/js/polyfills.js
deleted file mode 100644
index 0063b6d253..0000000000
--- a/web_src/js/polyfills.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// compat: IE11
-if (!Element.prototype.matches) {
- Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
-}
-
-// compat: IE11
-if (!Element.prototype.closest) {
- Element.prototype.closest = function (s) {
- let el = this;
-
- do {
- if (el.matches(s)) return el;
- el = el.parentElement || el.parentNode;
- } while (el !== null && el.nodeType === 1);
- return null;
- };
-}
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(/\/[^/]*?\/[^/]*?$/, '/');