This repository was archived by the owner on Nov 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmessage.js
More file actions
123 lines (119 loc) · 4 KB
/
Copy pathmessage.js
File metadata and controls
123 lines (119 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
Controller for message on clock/time webapp
Jiahua Chen
Inspired by codepen/kkoutoup
Last updated 6 July 2019
*/
window.addEventListener('load', loadMessage);
// Loads a series of messages and quotes
var message = ["CClock is a proof of concept and is not currently live! Visit Decount for a working clock! "]; // <- Message goes here!
var quotes = [
{
quote: "Start by doing what's necessary; then do what's possible; and suddenly you are doing the impossible.",
name: "Francis of Assisi"
},
{
quote: "Believe you can and you're halfway there.",
name: "Theodore Roosevelt"
},
{
quote: "It does not matter how slowly you go as long as you do not stop.",
name: "Confucius"
},
{
quote: "Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.",
name: "Thomas A. Edison"
},
{
quote: "The will to win, the desire to succeed, the urge to reach your full potential... these are the keys that will unlock the door to personal excellence.",
name: "Confucius"
},
{
quote: "Don't watch the clock; do what it does. Keep going.",
name: "Sam Levenson"
},
{
quote: "A creative man is motivated by the desire to achieve, not by the desire to beat others.",
name: "Ayn Rand"
},
{
quote: "A creative man is motivated by the desire to achieve, not by the desire to beat others.",
name: "Ayn Rand"
},
{
quote: "Expect problems and eat them for breakfast.",
name: "Alfred A. Montapert"
},
{
quote: "Start where you are. Use what you have. Do what you can.",
name: "Arthur Ashe"
},
{
quote: "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.",
name: "Samuel Beckett"
},
{
quote: "Be yourself; everyone else is already taken.",
name: "Oscar Wilde"
},
{
quote: "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.",
name: "Albert Einstein"
},
{
quote: "Always remember that you are absolutely unique. Just like everyone else.",
name: "Margaret Mead"
},
{
quote: "Do not take life too seriously. You will never get out of it alive.",
name: "Elbert Hubbard"
},
{
quote: "People who think they know everything are a great annoyance to those of us who do.",
name: "Isaac Asimov"
},
{
quote: "Procrastination is the art of keeping up with yesterday.",
name: "Don Marquis"
},
{
quote: "Get your facts first, then you can distort them as you please.",
name: "Mark Twain"
},
{
quote: "A day without sunshine is like, you know, night.",
name: "Steve Martin"
},
{
quote: "My grandmother started walking five miles a day when she was sixty. She's ninety-seven now, and we don't know where the hell she is.",
name: "Ellen DeGeneres"
},
{
quote: "Don't sweat the petty things and don't pet the sweaty things.",
name: "George Carlin"
},
{
quote: "Always do whatever's next.",
name: "George Carlin"
},
{
quote: "Atheism is a non-prophet organization.",
name: "George Carlin"
},
{
quote: "Hapiness is not something ready made. It comes from your own actions.",
name: "Dalai Lama"
}
]; // <- Quotes go here
function loadMessage() {
if (message.length !== 0) {
document.getElementById("message").innerHTML = message[0];
document.getElementById("message-widget").style.display = "block";
} else {
}
var idx = Math.floor(Math.random() * quotes.length);
// var idx = 5; // <- Clock quote
document.getElementById("quote").innerHTML = quotes[idx].quote;
document.getElementById("speaker").innerHTML = quotes[idx].name;
document.getElementById("quote-widget").style.display = "block";
}