diff --git a/04-quick-access-tab/README.md b/04-quick-access-tab/README.md index 80d9c51..b3e290d 100644 --- a/04-quick-access-tab/README.md +++ b/04-quick-access-tab/README.md @@ -1,6 +1,6 @@ # Quick Access Tab -Version: 1.2.4 +Version: 1.2.5 Developer: yszdlzn3195918 @@ -86,4 +86,49 @@ This extension stores user data (Notes and Reminders) in the browser's localStor ## License -This project is provided for personal use. All rights reserved by the developer. \ No newline at end of file +This project is provided for personal use. All rights reserved by the developer. + +## Update Records +### Version 0.9 + +Basic search bars. + +### Version 1.0 + +Quick links added. + +#### Version 1.0.1 + +Used Ubuntu and Noto Sans JP as font. + +### Version 1.1 + +Added time and date. + +#### Version 1.1.1 + +Added Notes. + +### Version 1.2 + +Added Daily Reminders (Not functioning). + +#### Version 1.2.1 + +Added slide-in panel. + +#### Version 1.2.2 + +Updates in slide-in panel. + +#### Version 1.2.3 + +Introducing the notes-reminders-container. + +#### Version 1.2.4 + +Changing positions of notes-reminders-container and search bar. Updated search bar focus. + +#### Version 1.2.5 + +Enabling click-outside functionality to close the slide-in panel. \ No newline at end of file diff --git a/04-quick-access-tab/manifest.json b/04-quick-access-tab/manifest.json index d132740..5ce0ec9 100644 --- a/04-quick-access-tab/manifest.json +++ b/04-quick-access-tab/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Quick Access Tab", - "version": "1.2.4", + "version": "1.2.5", "description": "Custom new tab with Google search + quick links", "chrome_url_overrides": { "newtab": "newtab_modern.html" diff --git a/04-quick-access-tab/script.js b/04-quick-access-tab/script.js index 0078d7e..81429dc 100644 --- a/04-quick-access-tab/script.js +++ b/04-quick-access-tab/script.js @@ -282,6 +282,29 @@ addBtn.onclick = (e) => { } }; + +// Close panel when clicking outside +document.addEventListener('click', (e) => { + if (isPanelOpen) { + // Check if click is outside both panel and button + const clickedInsidePanel = panel.contains(e.target); + const clickedButton = addBtn.contains(e.target); + + if (!clickedInsidePanel && !clickedButton) { + // Close and save if there are pending reminders + if (pendingReminders.length > 0) { + reminders = [...reminders, ...pendingReminders]; + localStorage.setItem('reminders', JSON.stringify(reminders)); + renderReminders(); // Refresh main page list + } + panel.classList.remove('active'); + addBtn.classList.remove('active'); + isPanelOpen = false; + pendingReminders = []; + } + } +}); + // Add to pending list addToListBtn.onclick = (e) => { e.preventDefault(); // Prevent page refresh @@ -313,4 +336,4 @@ function deleteReminder(index) { } // Initial render -renderReminders(); +renderReminders(); \ No newline at end of file diff --git a/04-quick-access-tab/styles.css b/04-quick-access-tab/styles.css index 52daa41..0b0eee6 100644 --- a/04-quick-access-tab/styles.css +++ b/04-quick-access-tab/styles.css @@ -269,9 +269,7 @@ body { font-weight: 300; } -/* ============================================ - NOTES SECTION - ============================================ */ +/* Notes section */ .notes-section { width: 100%; max-width: 450px; @@ -433,9 +431,7 @@ body { transition: opacity 0.5s ease; } -/* ============================================ - REMINDERS SECTION - ============================================ */ +/* Reminders Section */ .reminders-section { width: 100%; max-width: 450px; @@ -571,9 +567,7 @@ body { } -/* ============================================ - SLIDE-IN PANEL - ============================================ */ +/* Slide-in panel */ .reminder-panel { position: fixed !important; right: -400px; @@ -683,9 +677,7 @@ body { transform: scale(1.2); } -/* ============================================ - RESPONSIVE DESIGN - ============================================ */ +/* Responsive design */ @media (max-width: 768px) { .header { flex-direction: column; diff --git a/README.md b/README.md index 67211bc..544b33a 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Computerization's Web Tutorial (starting 2024) ## List of Tasks -| Date | Task name | Status | -| ---------- | -------------------------------------------- | ------------------------ | -| 2024-11-25 | [Number guessing game](/01-number_guessing/) |