From a17d6a5c4f589a4fefc45c8146dfeceabffadf4b Mon Sep 17 00:00:00 2001 From: Aslesh Sura <82917526+AsleshSura@users.noreply.github.com> Date: Thu, 20 Mar 2025 21:30:57 -0500 Subject: [PATCH 1/2] Add files via upload --- TimerExtension/icon.png | Bin 0 -> 15333 bytes TimerExtension/manifest.json | 22 ++++++ TimerExtension/popup.css | 105 ++++++++++++++++++++++++++ TimerExtension/popup.html | 46 ++++++++++++ TimerExtension/popup.js | 141 +++++++++++++++++++++++++++++++++++ 5 files changed, 314 insertions(+) create mode 100644 TimerExtension/icon.png create mode 100644 TimerExtension/manifest.json create mode 100644 TimerExtension/popup.css create mode 100644 TimerExtension/popup.html create mode 100644 TimerExtension/popup.js diff --git a/TimerExtension/icon.png b/TimerExtension/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2c53f3b8f3a00481d370127e75e9514765af75ed GIT binary patch literal 15333 zcmd_Rhdb5pA3y#&=NO?wQe+ER8D+~%Mr6~lmAxW+J5nK=gN(9gNXQbCNCD z99iG{yg%3Px_*Dd_uF-K)wy5y>%O1Q$8+A#`}vB{(NaZ{Gmt|NgjBn)qz6H8@LxD| zfdu@s=QI2d{6plfsAg~h{0X>V6%Kxrx!yN)hak#!!e3a@O-e>ENbjNi#6#c3#>4xm zn>FO^?Ja2k+|k|gsjIc1i<@owUl|4nVuRF_?i%=HY|QvpTYLI0pC6W`7W44f&USQzaz^q5 znQ_%L9JNDo+>P4hp-c7TQVxQh+}!fVOl#JZuxBVs)t+j4Tp#55#~9=eH%2zysmbW` z6LzI^y}l*6O(!DqeS!xoq;~0qP7Dg2NB@2g zc@Dz;&g&QsWFW>gbRh4n6~DkPI8c;MDX4-z9CVmh#7 zaJty~qKPK!kue6xeLWpDcP+Ox`S325!gPS{!ccT+mJGY(Rr#A4qATBng~eeG`NYHC z@U?%xQSVXbT88{w|DIViyf;SG>i$*meArrhT8k#WS7zog4qubs_Sn|K+{GND^4l}< z(T4Kfyh7WwsA{3b3}M$ugk5b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T#8!Rz+B*7)dWn!1xT z?mgySd*+j9`b8P?CdPM>oL_zfV7r{9wz-YKaXc2mO5~-QVB{2xqd{A%=V~`~DA|Zv zkMy3#Bs?WMb44 z{)r+b-wQK4>_yDHE8elhX_(k5CpdV+x2P@Xx4Hc-M_~^_s9>Gf)f}cxa85YBc_FAE zy*@;^ZL#luf+CZ4sy3z(Ua(r4RqEx-r{`t~O3Y%D^ghH}4mi%~)`zj4pirl+CwNBH zk<2mDMw2(`z>0f_Sx1Gwbkx=IhBAreE>2%Ii8PRAggn2BpyVO5n8-3aheNn|-pOPu zXB};^t~j)oV2@Tsv_7yW$w<sFJw>! zgzN+ao7#!#L5xtbB;4n#k`{?gXL4?uEak}s@Fl|Iv;EJD_qV|pahlE#d<|Urww~dB zj=K#PPN6n67N#&9;A!r65{1czQ1A&!D{%(=53^Bp&4L#A5H1XJxZN9QuMWPs^Yn-H z=S^Riq?hCe-?ue{2_K$$^Ym{wmkB+zK(Ha7YhxLRJGB>z@%2w!*?d3fjsH69 zvH8S=bXwU^XZa46_`D$^_|RI`{z8M-V7$tJ6P7vjR3b4j#I%i%u_qA2jyveJy1qCh zqjneYI3PhY9=%ikl?8oBagc_0Y1I46-$U&64)5L>q49AwI9Onj{-h0Uz8tG{a&)1> sirpLdJE6silgkzlHP4R|7`Dz44%GLW`8QGsAM`?M%34b0iWV>b51q*W-2eap literal 0 HcmV?d00001 diff --git a/TimerExtension/manifest.json b/TimerExtension/manifest.json new file mode 100644 index 00000000..b39ea4dd --- /dev/null +++ b/TimerExtension/manifest.json @@ -0,0 +1,22 @@ +{ + "manifest_version": 3, + "name": "AFK Timer & Stopwatch", + "version": "1.0", + "description": "A simple timer and stopwatch extension", + "action": { + "default_popup": "popup.html", + "default_icon": { + "128": "icon.png" + } + }, + "icons": { + "256": "icon.png" + }, + "permissions": [], + "browser_specific_settings": { + "gecko": { + "id": "timer@yourdomain.com" + } + } + } + diff --git a/TimerExtension/popup.css b/TimerExtension/popup.css new file mode 100644 index 00000000..e5f7ac8c --- /dev/null +++ b/TimerExtension/popup.css @@ -0,0 +1,105 @@ +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + background-color: #f5f5f5; + } + + .container { + width: 300px; + padding: 15px; + box-sizing: border-box; + } + + .title { + text-align: center; + margin-top: 0; + margin-bottom: 15px; + color: #333; + } + + .tabs { + display: flex; + margin-bottom: 15px; + border-bottom: 1px solid #ddd; + } + + .tab-btn { + flex: 1; + background-color: #f5f5f5; + border: none; + padding: 8px; + cursor: pointer; + transition: background-color 0.3s; + } + + .tab-btn.active { + background-color: #e0e0e0; + font-weight: bold; + } + + .section { + display: none; + padding: 10px; + background-color: white; + border-radius: 5px; + box-shadow: 0 2px 5px rgba(0,0,0,0.1); + } + + .section.active { + display: block; + } + + .display { + font-size: 2.5rem; + text-align: center; + margin: 15px 0; + font-family: monospace; + } + + .controls { + display: flex; + justify-content: space-between; + } + + button { + padding: 8px 15px; + background-color: #4285f4; + color: black; + border: none; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.3s; + font-family: monospace; + } + + button:hover { + background-color: #3367d6; + color: white; + } + + button:disabled { + background-color: #cccccc; + cursor: not-allowed; + } + + .input-group { + display: flex; + justify-content: center; + align-items: center; + margin-top: 10px; + } + + input[type="number"] { + width: 60px; + padding: 8px; + text-align: center; + font-size: 1.2rem; + border: 1px solid #ddd; + border-radius: 4px; + } + + .input-group span { + margin: 0 5px; + font-size: 1.5rem; + } \ No newline at end of file diff --git a/TimerExtension/popup.html b/TimerExtension/popup.html new file mode 100644 index 00000000..3fdf8693 --- /dev/null +++ b/TimerExtension/popup.html @@ -0,0 +1,46 @@ + + + + AFK Timer & Stopwatch + + + +
+

AFK Timer & Stopwatch

+ +
+ + +
+ +
+
00:00:00
+
+ + + +
+
+ +
+
+ + : + + : + +
+
00:00:00
+
+ + + +
+
+
+ + + + + + \ No newline at end of file diff --git a/TimerExtension/popup.js b/TimerExtension/popup.js new file mode 100644 index 00000000..c108fbe1 --- /dev/null +++ b/TimerExtension/popup.js @@ -0,0 +1,141 @@ +document.addEventListener('DOMContentLoaded', function() { + // Tab switching + const stopwatchTab = document.getElementById('stopwatch-tab'); + const timerTab = document.getElementById('timer-tab'); + const stopwatchSection = document.getElementById('stopwatch-section'); + const timerSection = document.getElementById('timer-section'); + + stopwatchTab.addEventListener('click', function() { + stopwatchTab.classList.add('active'); + timerTab.classList.remove('active'); + stopwatchSection.classList.add('active'); + timerSection.classList.remove('active'); + }); + + timerTab.addEventListener('click', function() { + timerTab.classList.add('active'); + stopwatchTab.classList.remove('active'); + timerSection.classList.add('active'); + stopwatchSection.classList.remove('active'); + }); + + // Stopwatch functionality + const stopwatchDisplay = document.getElementById('stopwatch-display'); + const stopwatchStartBtn = document.getElementById('stopwatch-start'); + const stopwatchPauseBtn = document.getElementById('stopwatch-pause'); + const stopwatchResetBtn = document.getElementById('stopwatch-reset'); + + let stopwatchInterval; + let stopwatchSeconds = 0; + + function updateStopwatchDisplay() { + const hours = Math.floor(stopwatchSeconds / 3600); + const minutes = Math.floor((stopwatchSeconds % 3600) / 60); + const seconds = stopwatchSeconds % 60; + + stopwatchDisplay.textContent = + (hours < 10 ? '0' + hours : hours) + ':' + + (minutes < 10 ? '0' + minutes : minutes) + ':' + + (seconds < 10 ? '0' + seconds : seconds); + } + + stopwatchStartBtn.addEventListener('click', function() { + stopwatchInterval = setInterval(function() { + stopwatchSeconds++; + updateStopwatchDisplay(); + }, 1000); + + stopwatchStartBtn.disabled = true; + stopwatchPauseBtn.disabled = false; + }); + + stopwatchPauseBtn.addEventListener('click', function() { + clearInterval(stopwatchInterval); + stopwatchStartBtn.disabled = false; + stopwatchPauseBtn.disabled = true; + }); + + stopwatchResetBtn.addEventListener('click', function() { + clearInterval(stopwatchInterval); + stopwatchSeconds = 0; + updateStopwatchDisplay(); + stopwatchStartBtn.disabled = false; + stopwatchPauseBtn.disabled = true; + }); + + // Timer functionality + const timerDisplay = document.getElementById('timer-display'); + const timerStartBtn = document.getElementById('timer-start'); + const timerPauseBtn = document.getElementById('timer-pause'); + const timerResetBtn = document.getElementById('timer-reset'); + const hoursInput = document.getElementById('hours'); + const minutesInput = document.getElementById('minutes'); + const secondsInput = document.getElementById('seconds'); + + let timerInterval; + let timerSeconds = 0; + let initialTimerSeconds = 0; + + function updateTimerDisplay() { + const hours = Math.floor(timerSeconds / 3600); + const minutes = Math.floor((timerSeconds % 3600) / 60); + const seconds = timerSeconds % 60; + + timerDisplay.textContent = + (hours < 10 ? '0' + hours : hours) + ':' + + (minutes < 10 ? '0' + minutes : minutes) + ':' + + (seconds < 10 ? '0' + seconds : seconds); + } + + timerStartBtn.addEventListener('click', function() { + if (timerSeconds === 0) { + // Get time from inputs + const hours = parseInt(hoursInput.value) || 0; + const minutes = parseInt(minutesInput.value) || 0; + const seconds = parseInt(secondsInput.value) || 0; + + initialTimerSeconds = timerSeconds = hours * 3600 + minutes * 60 + seconds; + + if (timerSeconds === 0) { + alert('Please set a time for the timer'); + return; + } + } + + timerInterval = setInterval(function() { + if (timerSeconds > 0) { + timerSeconds--; + updateTimerDisplay(); + } else { + clearInterval(timerInterval); + alert('Timer completed!'); + timerStartBtn.disabled = false; + timerPauseBtn.disabled = true; + } + }, 1000); + + timerStartBtn.disabled = true; + timerPauseBtn.disabled = false; + }); + + timerPauseBtn.addEventListener('click', function() { + clearInterval(timerInterval); + timerStartBtn.disabled = false; + timerPauseBtn.disabled = true; + }); + + timerResetBtn.addEventListener('click', function() { + clearInterval(timerInterval); + timerSeconds = 0; + updateTimerDisplay(); + hoursInput.value = 0; + minutesInput.value = 0; + secondsInput.value = 0; + timerStartBtn.disabled = false; + timerPauseBtn.disabled = true; + }); + + // Initialize displays + updateStopwatchDisplay(); + updateTimerDisplay(); + }); \ No newline at end of file From a77f8f7e5de4565b73b087ebee5aa1ecd2ff2a56 Mon Sep 17 00:00:00 2001 From: SOLID Date: Thu, 20 Mar 2025 21:34:44 -0500 Subject: [PATCH 2/2] fixing messes --- .../AFK Timer & Stopwatch}/icon.png | Bin .../AFK Timer & Stopwatch}/manifest.json | 44 +-- .../AFK Timer & Stopwatch}/popup.css | 208 ++++++------- .../AFK Timer & Stopwatch}/popup.html | 90 +++--- .../AFK Timer & Stopwatch}/popup.js | 280 +++++++++--------- 5 files changed, 311 insertions(+), 311 deletions(-) rename {TimerExtension => submissions/AFK Timer & Stopwatch}/icon.png (100%) rename {TimerExtension => submissions/AFK Timer & Stopwatch}/manifest.json (95%) rename {TimerExtension => submissions/AFK Timer & Stopwatch}/popup.css (94%) rename {TimerExtension => submissions/AFK Timer & Stopwatch}/popup.html (97%) rename {TimerExtension => submissions/AFK Timer & Stopwatch}/popup.js (97%) diff --git a/TimerExtension/icon.png b/submissions/AFK Timer & Stopwatch/icon.png similarity index 100% rename from TimerExtension/icon.png rename to submissions/AFK Timer & Stopwatch/icon.png diff --git a/TimerExtension/manifest.json b/submissions/AFK Timer & Stopwatch/manifest.json similarity index 95% rename from TimerExtension/manifest.json rename to submissions/AFK Timer & Stopwatch/manifest.json index b39ea4dd..c9b63eb9 100644 --- a/TimerExtension/manifest.json +++ b/submissions/AFK Timer & Stopwatch/manifest.json @@ -1,22 +1,22 @@ -{ - "manifest_version": 3, - "name": "AFK Timer & Stopwatch", - "version": "1.0", - "description": "A simple timer and stopwatch extension", - "action": { - "default_popup": "popup.html", - "default_icon": { - "128": "icon.png" - } - }, - "icons": { - "256": "icon.png" - }, - "permissions": [], - "browser_specific_settings": { - "gecko": { - "id": "timer@yourdomain.com" - } - } - } - +{ + "manifest_version": 3, + "name": "AFK Timer & Stopwatch", + "version": "1.0", + "description": "A simple timer and stopwatch extension", + "action": { + "default_popup": "popup.html", + "default_icon": { + "128": "icon.png" + } + }, + "icons": { + "256": "icon.png" + }, + "permissions": [], + "browser_specific_settings": { + "gecko": { + "id": "timer@yourdomain.com" + } + } + } + diff --git a/TimerExtension/popup.css b/submissions/AFK Timer & Stopwatch/popup.css similarity index 94% rename from TimerExtension/popup.css rename to submissions/AFK Timer & Stopwatch/popup.css index e5f7ac8c..f6cfb34a 100644 --- a/TimerExtension/popup.css +++ b/submissions/AFK Timer & Stopwatch/popup.css @@ -1,105 +1,105 @@ -body { - font-family: Arial, sans-serif; - margin: 0; - padding: 0; - background-color: #f5f5f5; - } - - .container { - width: 300px; - padding: 15px; - box-sizing: border-box; - } - - .title { - text-align: center; - margin-top: 0; - margin-bottom: 15px; - color: #333; - } - - .tabs { - display: flex; - margin-bottom: 15px; - border-bottom: 1px solid #ddd; - } - - .tab-btn { - flex: 1; - background-color: #f5f5f5; - border: none; - padding: 8px; - cursor: pointer; - transition: background-color 0.3s; - } - - .tab-btn.active { - background-color: #e0e0e0; - font-weight: bold; - } - - .section { - display: none; - padding: 10px; - background-color: white; - border-radius: 5px; - box-shadow: 0 2px 5px rgba(0,0,0,0.1); - } - - .section.active { - display: block; - } - - .display { - font-size: 2.5rem; - text-align: center; - margin: 15px 0; - font-family: monospace; - } - - .controls { - display: flex; - justify-content: space-between; - } - - button { - padding: 8px 15px; - background-color: #4285f4; - color: black; - border: none; - border-radius: 4px; - cursor: pointer; - transition: background-color 0.3s; - font-family: monospace; - } - - button:hover { - background-color: #3367d6; - color: white; - } - - button:disabled { - background-color: #cccccc; - cursor: not-allowed; - } - - .input-group { - display: flex; - justify-content: center; - align-items: center; - margin-top: 10px; - } - - input[type="number"] { - width: 60px; - padding: 8px; - text-align: center; - font-size: 1.2rem; - border: 1px solid #ddd; - border-radius: 4px; - } - - .input-group span { - margin: 0 5px; - font-size: 1.5rem; +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + background-color: #f5f5f5; + } + + .container { + width: 300px; + padding: 15px; + box-sizing: border-box; + } + + .title { + text-align: center; + margin-top: 0; + margin-bottom: 15px; + color: #333; + } + + .tabs { + display: flex; + margin-bottom: 15px; + border-bottom: 1px solid #ddd; + } + + .tab-btn { + flex: 1; + background-color: #f5f5f5; + border: none; + padding: 8px; + cursor: pointer; + transition: background-color 0.3s; + } + + .tab-btn.active { + background-color: #e0e0e0; + font-weight: bold; + } + + .section { + display: none; + padding: 10px; + background-color: white; + border-radius: 5px; + box-shadow: 0 2px 5px rgba(0,0,0,0.1); + } + + .section.active { + display: block; + } + + .display { + font-size: 2.5rem; + text-align: center; + margin: 15px 0; + font-family: monospace; + } + + .controls { + display: flex; + justify-content: space-between; + } + + button { + padding: 8px 15px; + background-color: #4285f4; + color: black; + border: none; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.3s; + font-family: monospace; + } + + button:hover { + background-color: #3367d6; + color: white; + } + + button:disabled { + background-color: #cccccc; + cursor: not-allowed; + } + + .input-group { + display: flex; + justify-content: center; + align-items: center; + margin-top: 10px; + } + + input[type="number"] { + width: 60px; + padding: 8px; + text-align: center; + font-size: 1.2rem; + border: 1px solid #ddd; + border-radius: 4px; + } + + .input-group span { + margin: 0 5px; + font-size: 1.5rem; } \ No newline at end of file diff --git a/TimerExtension/popup.html b/submissions/AFK Timer & Stopwatch/popup.html similarity index 97% rename from TimerExtension/popup.html rename to submissions/AFK Timer & Stopwatch/popup.html index 3fdf8693..39bb8b5c 100644 --- a/TimerExtension/popup.html +++ b/submissions/AFK Timer & Stopwatch/popup.html @@ -1,46 +1,46 @@ - - - - AFK Timer & Stopwatch - - - -
-

AFK Timer & Stopwatch

- -
- - -
- -
-
00:00:00
-
- - - -
-
- -
-
- - : - - : - -
-
00:00:00
-
- - - -
-
-
- - - - - + + + + AFK Timer & Stopwatch + + + +
+

AFK Timer & Stopwatch

+ +
+ + +
+ +
+
00:00:00
+
+ + + +
+
+ +
+
+ + : + + : + +
+
00:00:00
+
+ + + +
+
+
+ + + + + \ No newline at end of file diff --git a/TimerExtension/popup.js b/submissions/AFK Timer & Stopwatch/popup.js similarity index 97% rename from TimerExtension/popup.js rename to submissions/AFK Timer & Stopwatch/popup.js index c108fbe1..038bb1a6 100644 --- a/TimerExtension/popup.js +++ b/submissions/AFK Timer & Stopwatch/popup.js @@ -1,141 +1,141 @@ -document.addEventListener('DOMContentLoaded', function() { - // Tab switching - const stopwatchTab = document.getElementById('stopwatch-tab'); - const timerTab = document.getElementById('timer-tab'); - const stopwatchSection = document.getElementById('stopwatch-section'); - const timerSection = document.getElementById('timer-section'); - - stopwatchTab.addEventListener('click', function() { - stopwatchTab.classList.add('active'); - timerTab.classList.remove('active'); - stopwatchSection.classList.add('active'); - timerSection.classList.remove('active'); - }); - - timerTab.addEventListener('click', function() { - timerTab.classList.add('active'); - stopwatchTab.classList.remove('active'); - timerSection.classList.add('active'); - stopwatchSection.classList.remove('active'); - }); - - // Stopwatch functionality - const stopwatchDisplay = document.getElementById('stopwatch-display'); - const stopwatchStartBtn = document.getElementById('stopwatch-start'); - const stopwatchPauseBtn = document.getElementById('stopwatch-pause'); - const stopwatchResetBtn = document.getElementById('stopwatch-reset'); - - let stopwatchInterval; - let stopwatchSeconds = 0; - - function updateStopwatchDisplay() { - const hours = Math.floor(stopwatchSeconds / 3600); - const minutes = Math.floor((stopwatchSeconds % 3600) / 60); - const seconds = stopwatchSeconds % 60; - - stopwatchDisplay.textContent = - (hours < 10 ? '0' + hours : hours) + ':' + - (minutes < 10 ? '0' + minutes : minutes) + ':' + - (seconds < 10 ? '0' + seconds : seconds); - } - - stopwatchStartBtn.addEventListener('click', function() { - stopwatchInterval = setInterval(function() { - stopwatchSeconds++; - updateStopwatchDisplay(); - }, 1000); - - stopwatchStartBtn.disabled = true; - stopwatchPauseBtn.disabled = false; - }); - - stopwatchPauseBtn.addEventListener('click', function() { - clearInterval(stopwatchInterval); - stopwatchStartBtn.disabled = false; - stopwatchPauseBtn.disabled = true; - }); - - stopwatchResetBtn.addEventListener('click', function() { - clearInterval(stopwatchInterval); - stopwatchSeconds = 0; - updateStopwatchDisplay(); - stopwatchStartBtn.disabled = false; - stopwatchPauseBtn.disabled = true; - }); - - // Timer functionality - const timerDisplay = document.getElementById('timer-display'); - const timerStartBtn = document.getElementById('timer-start'); - const timerPauseBtn = document.getElementById('timer-pause'); - const timerResetBtn = document.getElementById('timer-reset'); - const hoursInput = document.getElementById('hours'); - const minutesInput = document.getElementById('minutes'); - const secondsInput = document.getElementById('seconds'); - - let timerInterval; - let timerSeconds = 0; - let initialTimerSeconds = 0; - - function updateTimerDisplay() { - const hours = Math.floor(timerSeconds / 3600); - const minutes = Math.floor((timerSeconds % 3600) / 60); - const seconds = timerSeconds % 60; - - timerDisplay.textContent = - (hours < 10 ? '0' + hours : hours) + ':' + - (minutes < 10 ? '0' + minutes : minutes) + ':' + - (seconds < 10 ? '0' + seconds : seconds); - } - - timerStartBtn.addEventListener('click', function() { - if (timerSeconds === 0) { - // Get time from inputs - const hours = parseInt(hoursInput.value) || 0; - const minutes = parseInt(minutesInput.value) || 0; - const seconds = parseInt(secondsInput.value) || 0; - - initialTimerSeconds = timerSeconds = hours * 3600 + minutes * 60 + seconds; - - if (timerSeconds === 0) { - alert('Please set a time for the timer'); - return; - } - } - - timerInterval = setInterval(function() { - if (timerSeconds > 0) { - timerSeconds--; - updateTimerDisplay(); - } else { - clearInterval(timerInterval); - alert('Timer completed!'); - timerStartBtn.disabled = false; - timerPauseBtn.disabled = true; - } - }, 1000); - - timerStartBtn.disabled = true; - timerPauseBtn.disabled = false; - }); - - timerPauseBtn.addEventListener('click', function() { - clearInterval(timerInterval); - timerStartBtn.disabled = false; - timerPauseBtn.disabled = true; - }); - - timerResetBtn.addEventListener('click', function() { - clearInterval(timerInterval); - timerSeconds = 0; - updateTimerDisplay(); - hoursInput.value = 0; - minutesInput.value = 0; - secondsInput.value = 0; - timerStartBtn.disabled = false; - timerPauseBtn.disabled = true; - }); - - // Initialize displays - updateStopwatchDisplay(); - updateTimerDisplay(); +document.addEventListener('DOMContentLoaded', function() { + // Tab switching + const stopwatchTab = document.getElementById('stopwatch-tab'); + const timerTab = document.getElementById('timer-tab'); + const stopwatchSection = document.getElementById('stopwatch-section'); + const timerSection = document.getElementById('timer-section'); + + stopwatchTab.addEventListener('click', function() { + stopwatchTab.classList.add('active'); + timerTab.classList.remove('active'); + stopwatchSection.classList.add('active'); + timerSection.classList.remove('active'); + }); + + timerTab.addEventListener('click', function() { + timerTab.classList.add('active'); + stopwatchTab.classList.remove('active'); + timerSection.classList.add('active'); + stopwatchSection.classList.remove('active'); + }); + + // Stopwatch functionality + const stopwatchDisplay = document.getElementById('stopwatch-display'); + const stopwatchStartBtn = document.getElementById('stopwatch-start'); + const stopwatchPauseBtn = document.getElementById('stopwatch-pause'); + const stopwatchResetBtn = document.getElementById('stopwatch-reset'); + + let stopwatchInterval; + let stopwatchSeconds = 0; + + function updateStopwatchDisplay() { + const hours = Math.floor(stopwatchSeconds / 3600); + const minutes = Math.floor((stopwatchSeconds % 3600) / 60); + const seconds = stopwatchSeconds % 60; + + stopwatchDisplay.textContent = + (hours < 10 ? '0' + hours : hours) + ':' + + (minutes < 10 ? '0' + minutes : minutes) + ':' + + (seconds < 10 ? '0' + seconds : seconds); + } + + stopwatchStartBtn.addEventListener('click', function() { + stopwatchInterval = setInterval(function() { + stopwatchSeconds++; + updateStopwatchDisplay(); + }, 1000); + + stopwatchStartBtn.disabled = true; + stopwatchPauseBtn.disabled = false; + }); + + stopwatchPauseBtn.addEventListener('click', function() { + clearInterval(stopwatchInterval); + stopwatchStartBtn.disabled = false; + stopwatchPauseBtn.disabled = true; + }); + + stopwatchResetBtn.addEventListener('click', function() { + clearInterval(stopwatchInterval); + stopwatchSeconds = 0; + updateStopwatchDisplay(); + stopwatchStartBtn.disabled = false; + stopwatchPauseBtn.disabled = true; + }); + + // Timer functionality + const timerDisplay = document.getElementById('timer-display'); + const timerStartBtn = document.getElementById('timer-start'); + const timerPauseBtn = document.getElementById('timer-pause'); + const timerResetBtn = document.getElementById('timer-reset'); + const hoursInput = document.getElementById('hours'); + const minutesInput = document.getElementById('minutes'); + const secondsInput = document.getElementById('seconds'); + + let timerInterval; + let timerSeconds = 0; + let initialTimerSeconds = 0; + + function updateTimerDisplay() { + const hours = Math.floor(timerSeconds / 3600); + const minutes = Math.floor((timerSeconds % 3600) / 60); + const seconds = timerSeconds % 60; + + timerDisplay.textContent = + (hours < 10 ? '0' + hours : hours) + ':' + + (minutes < 10 ? '0' + minutes : minutes) + ':' + + (seconds < 10 ? '0' + seconds : seconds); + } + + timerStartBtn.addEventListener('click', function() { + if (timerSeconds === 0) { + // Get time from inputs + const hours = parseInt(hoursInput.value) || 0; + const minutes = parseInt(minutesInput.value) || 0; + const seconds = parseInt(secondsInput.value) || 0; + + initialTimerSeconds = timerSeconds = hours * 3600 + minutes * 60 + seconds; + + if (timerSeconds === 0) { + alert('Please set a time for the timer'); + return; + } + } + + timerInterval = setInterval(function() { + if (timerSeconds > 0) { + timerSeconds--; + updateTimerDisplay(); + } else { + clearInterval(timerInterval); + alert('Timer completed!'); + timerStartBtn.disabled = false; + timerPauseBtn.disabled = true; + } + }, 1000); + + timerStartBtn.disabled = true; + timerPauseBtn.disabled = false; + }); + + timerPauseBtn.addEventListener('click', function() { + clearInterval(timerInterval); + timerStartBtn.disabled = false; + timerPauseBtn.disabled = true; + }); + + timerResetBtn.addEventListener('click', function() { + clearInterval(timerInterval); + timerSeconds = 0; + updateTimerDisplay(); + hoursInput.value = 0; + minutesInput.value = 0; + secondsInput.value = 0; + timerStartBtn.disabled = false; + timerPauseBtn.disabled = true; + }); + + // Initialize displays + updateStopwatchDisplay(); + updateTimerDisplay(); }); \ No newline at end of file