Skip to content

Instantly share code, notes, and snippets.

@praveen-me
Created September 20, 2018 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save praveen-me/f71aad7241103bc054f258f340bd5a86 to your computer and use it in GitHub Desktop.
Save praveen-me/f71aad7241103bc054f258f340bd5a86 to your computer and use it in GitHub Desktop.
Chrome Extension Blog
const hourElm = document.getElementById('hour');
const minutesElm = document.getElementById('minutes');
// function to set time
function setTime() {
let now = new Date();
hourElm.innerHTML = now.getHours();
minutesElm.innerHTML = now.getMinutes();
}
function init() {
//Setting Time
setTimeout(setTime, 1000);
}
init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment