summaryrefslogtreecommitdiff
path: root/frontend/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/index.js')
-rw-r--r--frontend/index.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/frontend/index.js b/frontend/index.js
index 0cbd896..f481bc6 100644
--- a/frontend/index.js
+++ b/frontend/index.js
@@ -1,10 +1,10 @@
/// <reference path="scripts/jquery-3.5.1.min.js"/>
-function main() {
- console.log('Document ready.');
- const lPathName = window.location.pathname.length > 1 && window.location.pathname.startsWith('/') ? window.location.pathname.substr(1) : window.location.pathname;
- console.log(lPathName);
- $('nav').find('a[href="' + lPathName + '"').addClass('nav-selected');
-}
-
-$(document).ready(main); \ No newline at end of file
+(function() {
+ function main() {
+ const lPathName = window.location.pathname.length > 1 && window.location.pathname.startsWith('/') ? window.location.pathname.substr(1) : window.location.pathname;
+ $('nav').find('a[href="' + lPathName + '"').addClass('nav-selected');
+ }
+
+ $(document).ready(main);
+})() \ No newline at end of file