aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/publicPath.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-03-11 20:34:54 +0100
committerGitHub <noreply@github.com>2020-03-11 21:34:54 +0200
commite03d6277698f4e1e03d9336ba017bae130d4353c (patch)
tree418c84dd378bc86093f9837de80f92c13fe87f68 /web_src/js/publicPath.js
parent984b85c1a72f9f1561447a8492bc3d33a87e3641 (diff)
downloadgitea-e03d6277698f4e1e03d9336ba017bae130d4353c.tar.gz
gitea-e03d6277698f4e1e03d9336ba017bae130d4353c.zip
Misc JS linting and naming tweaks (#10652)
- lowercase all js filenames except Vue components - enable new lint rules, mostly focused on shorter code - autofix new lint violations - apply misc transformations indexOf -> includes and onevent-> addEventListener Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Diffstat (limited to 'web_src/js/publicPath.js')
-rw-r--r--web_src/js/publicPath.js11
1 files changed, 0 insertions, 11 deletions
diff --git a/web_src/js/publicPath.js b/web_src/js/publicPath.js
deleted file mode 100644
index 120740d708..0000000000
--- a/web_src/js/publicPath.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* 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(/\/[^/]*?\/[^/]*?$/, '/');
-}