Skip to content

Commit 0ba2449

Browse files
Update script.js
1 parent 4b56b5c commit 0ba2449

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

script.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Redirect to setup if first time
21
if (!localStorage.getItem('setupDone')) {
32
window.location.href = 'setup.html';
43
}
@@ -7,22 +6,21 @@ let clickCount = 0;
76
let clickTimeout = null;
87

98
document.body.addEventListener('click', function(e) {
9+
// Apasă pe fundal (nu pe elemente interactive)
1010
if (e.target === document.body) {
1111
clickCount++;
1212
if (clickTimeout) clearTimeout(clickTimeout);
1313
clickTimeout = setTimeout(() => clickCount = 0, 1000);
14-
1514
if (clickCount >= 4) {
1615
window.location.href = 'lockscreen.html';
1716
}
1817
}
1918
});
2019

21-
function openApp(name) {
22-
alert('Deschizi aplicația: ' + name);
20+
function openApp(url) {
21+
window.location.href = url;
2322
}
2423

25-
// Live clock
2624
function updateClock() {
2725
const now = new Date();
2826
const time = now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});

0 commit comments

Comments
 (0)