Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
berlintay authored Aug 10, 2024
1 parent 5d36146 commit 57d8551
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ document.addEventListener("DOMContentLoaded", function() {
})
.catch(error => console.error('Error fetching GitHub trending data:', error));

// Function to update the current time display
function updateTime() {
const now = new Date();
const currentTime = document.getElementById('current-time');
if (currentTime) {
currentTime.textContent = now.toLocaleTimeString('en-US', { hour12: false });
}
}

// Update the time every second
setInterval(updateTime, 1000);
});

// Function to process terminal commands
function processCommand(command) {
switch (command) {
Expand Down

0 comments on commit 57d8551

Please sign in to comment.