Spaces:
Build error
Build error
Update templates/index.html
Browse files- templates/index.html +25 -1
templates/index.html
CHANGED
|
@@ -148,7 +148,8 @@
|
|
| 148 |
}
|
| 149 |
|
| 150 |
.disabled {
|
| 151 |
-
cursor: not-allowed !important;
|
|
|
|
| 152 |
}
|
| 153 |
|
| 154 |
/* Responsive design */
|
|
@@ -264,6 +265,29 @@
|
|
| 264 |
// Add "active" class to the clicked button
|
| 265 |
element.classList.add('active');
|
| 266 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
</script>
|
| 268 |
</body>
|
| 269 |
</html>
|
|
|
|
| 148 |
}
|
| 149 |
|
| 150 |
.disabled {
|
| 151 |
+
cursor: not-allowed !important;
|
| 152 |
+
opacity: 0.6;/* Set cursor to not-allowed */
|
| 153 |
}
|
| 154 |
|
| 155 |
/* Responsive design */
|
|
|
|
| 265 |
// Add "active" class to the clicked button
|
| 266 |
element.classList.add('active');
|
| 267 |
}
|
| 268 |
+
// Removing cookie once process completed
|
| 269 |
+
function setCookie(name, value, days) {
|
| 270 |
+
let expires = "";
|
| 271 |
+
if (days) {
|
| 272 |
+
const date = new Date();
|
| 273 |
+
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
| 274 |
+
expires = "; expires=" + date.toUTCString();
|
| 275 |
+
}
|
| 276 |
+
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
function deleteCookie(name) {
|
| 280 |
+
document.cookie = name + '=; Max-Age=0; path=/;'; // Delete the cookie
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
// Set the cookie (you can comment this out after testing)
|
| 284 |
+
setCookie('myCookie', 'myValue', 1); // Sets a cookie for demonstration
|
| 285 |
+
|
| 286 |
+
// Automatically delete the cookie when the page is loaded or refreshed
|
| 287 |
+
window.onload = function() {
|
| 288 |
+
deleteCookie('myCookie'); // Replace 'myCookie' with your cookie name
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
</script>
|
| 292 |
</body>
|
| 293 |
</html>
|