-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaipublic.html
More file actions
48 lines (42 loc) · 1.39 KB
/
Copy pathaipublic.html
File metadata and controls
48 lines (42 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html>
<head>
<script>(function(){if(!sessionStorage.getItem('recaptcha_verified')||sessionStorage.getItem('recaptcha_verified')!=='true'){window.location.href='exp.html';}})();</script>
</head>
<body>
<h1>Access Denied</h1>
<div>This is not open yet, Come back soon and check. It on blog also!</div>
<button onclick="location.href='hub.html'">Back to Hub</button>
<script>
// Session timeout and tab exit detection
(function() {
const TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes
function updateActivity() {
sessionStorage.setItem('last_activity', Date.now().toString());
}
function checkTimeout() {
const lastActivity = sessionStorage.getItem('last_activity');
if (!lastActivity || Date.now() - parseInt(lastActivity) > TIMEOUT_MS) {
sessionStorage.clear();
window.location.href = 'exp.html';
}
}
// Initialize last activity
updateActivity();
// Update activity on user interactions
['mousedown', 'keydown', 'scroll', 'touchstart'].forEach(function(event) {
document.addEventListener(event, updateActivity);
});
// Check timeout every minute
setInterval(checkTimeout, 60000);
// Clear session when tab is hidden/exited
document.addEventListener('visibilitychange', function() {
if (document.hidden) {
sessionStorage.clear();
window.location.href = 'exp.html';
}
});
})();
</script>
</body>
</html>