Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,28 @@ <h2 class="mt-0 mb-20">Projects</h2>
<!-- End Projects Table -->
</div>
</div>
<script>
document.addEventListener('keydown', function(e) {
// Ignore if typing in an input, textarea, or contenteditable
const active = document.activeElement;
if (
active && (
active.tagName === 'INPUT' ||
active.tagName === 'TEXTAREA' ||
active.isContentEditable
)
) {
return;
}
if (e.key === '/' && !e.ctrlKey && !e.metaKey && !e.altKey) {
const searchInput = document.querySelector('.head .search input[type="search"]');
if (searchInput) {
e.preventDefault();
searchInput.focus();
}
}
});
</script>
</body>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider extracting the JavaScript code to an external file (e.g., js/dashboard.js) for better code organization and maintainability. This would separate concerns and make the HTML cleaner, especially as more interactive features are added to the dashboard.

For example:

  • Create js/dashboard.js with the keyboard shortcut logic
  • Replace the inline script with <script src="js/dashboard.js"></script>
  • This approach makes the code more modular and easier to test


</html>