diff --git a/README.md b/README.md index 659437e..6e23023 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ "Web Browser Homepage" is a custom homepage / new tab page built for web browsers.

+ +To access this page, paste the following URL:
+`https://raw.githack.com/k-capehart/Web-Browser-Homepage/master/index.html` + +Alternatively, pull down the repository and set your Homepage URL to the local file path, i.e.
+`/Users/kcapehart/Documents/Web-Browser-Homepage/index.html` + +Learn how to set a startup / homepage in: +- [Google Chrome](https://support.google.com/chrome/answer/95314?hl=en&co=GENIE.Platform%3DDesktop#zippy=) +- [Firefox](https://support.mozilla.org/en-US/kb/how-to-set-the-home-page) +- [Safari](https://support.apple.com/guide/safari/change-your-homepage-ibrw1020/mac) diff --git a/index.html b/index.html index 9b7b07b..cc994e8 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ - + @@ -24,14 +24,15 @@
What's on your mind?
+ \ No newline at end of file diff --git a/script.js b/script.js index 1915b51..4fca42a 100644 --- a/script.js +++ b/script.js @@ -1,24 +1,28 @@ -// INITIALIZATIONS +let timeOfDay; +let today; +let hour; +let minute; +let second; +let day; +let month; +let year; -// get/initialize time and date values - global variables -let timeOfDay = "AM"; -let today = new Date(); -let hour = today.getHours(); -let minute = today.getMinutes(); -let second = today.getSeconds(); -let day = today.getDate(); -let month = today.getMonth(); -let year = today.getFullYear(); - -// check the time and adjust the format -minute = checkTime(minute); -second = checkTime(second); - -// CODE FOR THE SITE BACKGROUND +function updateClock() { + timeOfDay = "AM"; + today = new Date(); + hour = today.getHours(); + minute = today.getMinutes(); + second = today.getSeconds(); + day = today.getDate(); + month = today.getMonth(); + year = today.getFullYear(); + + // check the time and adjust the format + minute = checkTime(minute); + second = checkTime(second); +} function setBackgroundGradient() { - // Setting background gradients according to the time of the day - if (hour < 5) { // early morning gradient document.querySelector('body').style.background="linear-gradient(-45deg, #767d92, #2f4562, #152642, #081b33)"; @@ -42,8 +46,6 @@ function setBackgroundGradient() { document.querySelector('body').style.animation="gradient 8s ease infinite"; } -// CODE FOR THE GLASS OVERLAY AND ITS CHILD COMPONENTS - function loadGlassOverlayComponents() { // set the greeting message according the time of the day @@ -113,6 +115,7 @@ function convertHour(hourValue) { return hourValue; } -// jQuery function calls $(document).ready(setBackgroundGradient); -$(document).ready(loadGlassOverlayComponents); \ No newline at end of file +$(document).ready(loadGlassOverlayComponents); +updateClock(); +setInterval(updateClock, 1000); \ No newline at end of file