Add files via upload

This commit is contained in:
Dave R 2018-08-08 18:08:17 +01:00 committed by GitHub
parent 1074d8260d
commit 1d75e4cfc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 93 additions and 0 deletions

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
images/1.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

BIN
images/2.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

BIN
images/3.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

BIN
images/4.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 KiB

27
index.css Normal file
View File

@ -0,0 +1,27 @@
body {
color: white;
font-family: "Roboto Light";
}
h1 {
font-size: 150px;
}
h2 {
font-size: 100px;
}
h3 {
font-size: 25px;
}
html {
overflow: scroll;
overflow-x: hidden;
}
::-webkit-scrollbar {
width: 0px;
background: transparent; /* https://stackoverflow.com/questions/16670931/ */
}
::-webkit-scrollbar-thumb {
background: #FF0000;
}

24
index.html Normal file
View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>New Tab</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center>
<br><br><br><br>
<h1 class="time">
<div id="timemsg"></div>
</h1>
<h2 class="greeting">
<div id="greetingmsg"></div>
</h2>
<br><br><br><br><br><br><br><br><br><br>
<h3 class ="quote">
<div id="quotemsg"></div>
</center>
</body>
<script src="index.js"></script>
</html>

31
index.js Normal file
View File

@ -0,0 +1,31 @@
var day = new Date();
var hr = day.getHours();
if (hr < 12) {
document.getElementById("greetingmsg").innerHTML = "Good Morning";
} else
if ((hr == 12 || hr == 13 || hr == 14 || hr == 15 || hr == 16)){
document.getElementById("greetingmsg").innerHTML = "Good Afternoon";
} else
if (hr >= 17) {
document.getElementById("greetingmsg").innerHTML = "Good Evening";
}
var num = Math.ceil( Math.random() * 5 );
document.body.background = 'images/'+num+'.jpeg'; //https://stackoverflow.com/a/15231912
document.body.style.backgroundRepeat = "repeat";
var quotes = ['"Time goes on. So whatever youre going to do, do it. Do it now. Dont wait." - Robert De Niro'];
var length = quotes.length;
var rand = Math.round(Math.random()*(length - 1));
document.getElementById("quotemsg").innerHTML = quotes[rand];
setInterval(function() {
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
var currentTimeString = currentHours + ":" + currentMinutes + " ";
document.getElementById("timemsg").innerHTML = currentTimeString;
}, 100);

11
manifest.json Normal file
View File

@ -0,0 +1,11 @@
{
"manifest_version": 2,
"name": "Mue",
"version": "0.1",
"browser_action": {
"default_icon": "icon.png"
},
"chrome_url_overrides" : {
"newtab": "index.html"
}
}