summaryrefslogtreecommitdiff
path: root/frontend/index.js
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-02-06 18:39:48 -0500
committerMatthew Kosarek <mattkae@protonmail.com>2021-02-06 18:39:48 -0500
commit376e1a7f9207fffb1ec3027ac1e7f32db5de4922 (patch)
tree8bc6c381a10d8b62ff33cdcff6daa1d17cee0f9a /frontend/index.js
Initial commit
Diffstat (limited to 'frontend/index.js')
-rw-r--r--frontend/index.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/frontend/index.js b/frontend/index.js
new file mode 100644
index 0000000..0cbd896
--- /dev/null
+++ b/frontend/index.js
@@ -0,0 +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