Commit cd492710 by Daniel Bawag

Added URL handling

parent 352c654e
...@@ -27,7 +27,11 @@ ...@@ -27,7 +27,11 @@
</head> </head>
<script> <script>
fetchConfig(); if(sessionStorage.getItem('user_id') === null ) {
window.location.href = "./login.html";
} else {
fetchConfig();
}
</script> </script>
<body> <body>
......
...@@ -7,7 +7,13 @@ ...@@ -7,7 +7,13 @@
<script src="https://code.jquery.com/jquery-3.6.0.min.js" <script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="./src/fetchConfig/fetchConfig.js"></script> <script src="./src/fetchConfig/fetchConfig.js"></script>
<script>fetchConfig()</script> <script>
if(sessionStorage.getItem('user_id') !== null ) {
window.location.href = "./index.html";
} else {
fetchConfig();
}
</script>
</head> </head>
<body> <body>
<div class="main-div"> <div class="main-div">
......
...@@ -27,7 +27,7 @@ function validateForm() { ...@@ -27,7 +27,7 @@ function validateForm() {
if(windowWidth >= REQWINDOWWIDTH && windowHeight >= REQWINDOWHEIGHT && browser == REQBROWSER){ if(windowWidth >= reqWindowWidth && windowHeight >= reqWindowHeight && browser == reqBrowser){
for (let i = 0; i < credObj.length; i++) { for (let i = 0; i < credObj.length; i++) {
// console.log(credObj[i].username + " " + credObj[i].password); // console.log(credObj[i].username + " " + credObj[i].password);
if ((un == credObj[i].username) && (pw == credObj[i].password)) { if ((un == credObj[i].username) && (pw == credObj[i].password)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment