Commit cd492710 by Daniel Bawag

Added URL handling

parent 352c654e
......@@ -27,7 +27,11 @@
</head>
<script>
if(sessionStorage.getItem('user_id') === null ) {
window.location.href = "./login.html";
} else {
fetchConfig();
}
</script>
<body>
......
......@@ -7,7 +7,13 @@
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></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>
<body>
<div class="main-div">
......
......@@ -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++) {
// console.log(credObj[i].username + " " + 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