Spaces:
Runtime error
Runtime error
Update templates/index.html
Browse files- templates/index.html +24 -1
templates/index.html
CHANGED
|
@@ -145,7 +145,8 @@
|
|
| 145 |
margin-top: 70px;
|
| 146 |
}
|
| 147 |
.disabled {
|
| 148 |
-
cursor: not-allowed !important;
|
|
|
|
| 149 |
}
|
| 150 |
|
| 151 |
/* Responsive design */
|
|
@@ -255,6 +256,28 @@
|
|
| 255 |
// Add "active" class to the clicked button
|
| 256 |
element.classList.add('active');
|
| 257 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
</script>
|
| 259 |
</body>
|
| 260 |
|
|
|
|
| 145 |
margin-top: 70px;
|
| 146 |
}
|
| 147 |
.disabled {
|
| 148 |
+
cursor: not-allowed !important;
|
| 149 |
+
opacity: 0.6;/* Set cursor to not-allowed */
|
| 150 |
}
|
| 151 |
|
| 152 |
/* Responsive design */
|
|
|
|
| 256 |
// Add "active" class to the clicked button
|
| 257 |
element.classList.add('active');
|
| 258 |
}
|
| 259 |
+
//Refreshing the cookie
|
| 260 |
+
function setCookie(name, value, days) {
|
| 261 |
+
let expires = "";
|
| 262 |
+
if (days) {
|
| 263 |
+
const date = new Date();
|
| 264 |
+
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
| 265 |
+
expires = "; expires=" + date.toUTCString();
|
| 266 |
+
}
|
| 267 |
+
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
function deleteCookie(name) {
|
| 271 |
+
document.cookie = name + '=; Max-Age=0; path=/;'; // Delete the cookie
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
// Set the cookie (you can comment this out after testing)
|
| 275 |
+
setCookie('myCookie', 'myValue', 1); // Sets a cookie for demonstration
|
| 276 |
+
|
| 277 |
+
// Automatically delete the cookie when the page is loaded or refreshed
|
| 278 |
+
window.onload = function() {
|
| 279 |
+
deleteCookie('myCookie'); // Replace 'myCookie' with your cookie name
|
| 280 |
+
}
|
| 281 |
</script>
|
| 282 |
</body>
|
| 283 |
|