-
Notifications
You must be signed in to change notification settings - Fork 0
/
quote.js
86 lines (79 loc) · 12.6 KB
/
quote.js
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
var quoteBookAuthorSeries = [
//, "Lord of the Rings", "JRR Tolkien"
["I don’t know half of you half as well as I should like; and I like less than half of you half as well as you deserve.", "Lord of the Rings", "JRR Tolkien"],
["The Road goes ever on and on / Down from the door where it began. / Now far ahead the / Road has gone, / And I must follow, if I can, / Pursuing it with eager feet, / Until it joins some larger way / Where many paths and errands meet. / And whither then? I cannot say.", "Lord of the Rings", "JRR Tolkien"],
["All we have to decide is what to do with the time that is given us.", "Lord of the Rings", "JRR Tolkien"],
["Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends.", "Lord of the Rings", "JRR Tolkien"],
["The wide world is all about you: you can fence yourselves in, but you cannot for ever fence it out.", "Lord of the Rings", "JRR Tolkien"],
["Courage is found in unlikely places.", "Lord of the Rings", "JRR Tolkien"],
["All that is gold does not glitter, / Not all those who wander are lost; / The old that is strong does not wither, / Deep roots are not reached by the frost. / From the ashes a fire shall be woken, / A light from the shadows shall spring; / Renewed shall be blade that was broken, / The crownless again shall be king.", "Lord of the Rings", "JRR Tolkien"],
["Don’t adventures ever have an end? I suppose not. Someone else always has to carry on the story.", "Lord of the Rings", "JRR Tolkien"],
["... and the light of her eyes fell on him from afar and pierced his heart.", "Lord of the Rings", "JRR Tolkien"],
["For nothing is evil in the beginning.", "Lord of the Rings", "JRR Tolkien"],
["It is wisdom to recognize necessity, when all other courses have been weighed, though as folly it may appear to those who cling to false hope.", "Lord of the Rings", "JRR Tolkien"],
["‘I will take the Ring,’ he said, ‘though I do not know the way.’", "Lord of the Rings", "JRR Tolkien"],
["‘The Company of the Ring shall be Nine; and the Nine Walkers shall be set against the Nine Riders that are evil. With you and your faithful servant, Gandalf will go; for this shall be his great task, and maybe the end of his labours.", "Lord of the Rings", "JRR Tolkien"],
["Faithless is he that says farewell when the road darkens", "Lord of the Rings", "JRR Tolkien"],
["It seemed to him that he looked suddenly into the heart of an enemy and saw there love and understanding.", "Lord of the Rings", "JRR Tolkien"],
["Maybe the paths that you each shall tread are already laid before your feet, though you do not see them.", "Lord of the Rings", "JRR Tolkien"],
["... and they let the River bear them on at its own pace, having no desire to hasten towards the perils that lay beyond, whichever course they took in the end.", "Lord of the Rings", "JRR Tolkien"],
["‘Do we walk in legends or on the green earth in the daylight?’ ‘A man may do both,’", "Lord of the Rings", "JRR Tolkien"],
["‘There are some things that it is better to begin than to refuse, even though the end may be dark.", "Lord of the Rings", "JRR Tolkien"],
["It is easier to shout ‘Stop!’ than to do it.", "Lord of the Rings", "JRR Tolkien"],
["There might be all the difference between an old cow sitting and thoughtfully chewing, and a bull charging; and the change might come suddenly.", "Lord of the Rings", "JRR Tolkien"],
["One who cannot cast away a treasure at need is in fetters.", "Lord of the Rings", "JRR Tolkien"],
["It was Sam’s first view of a battle of Men against Men, and he did not like it much. He was glad that he could not see the dead face. He wondered what the man’s name was and where he came from; and if he was really evil of heart, or what lies or threats had led him on the long march from his home; and if he would not really rather have stayed there in peace...", "Lord of the Rings", "JRR Tolkien"],
["I do not love the bright sword for its sharpness, nor the arrow for its swiftness, nor the warrior for his glory. I love only that which they defend", "Lord of the Rings", "JRR Tolkien"],
["The brave things in the old tales and songs, Mr. Frodo: adventures, as I used to call them. I used to think that they were things the wonderful folk of the stories went out and looked for, because they wanted them, because they were exciting and life was a bit dull, a kind of a sport, as you might say. But that’s not the way of it with the tales that really mattered, or the ones that stay in the mind. Folk seem to have been just landed in them, usually – their paths were laid that way, as you put it. But I expect they had lots of chances, like us, of turning back, only they didn’t. And if they had, we shouldn’t know, because they’d have been forgotten. We hear about those as just went on – and not all to a good end, mind you; at least not to what folk inside a story and not outside it call a good end. You know, coming home, and finding things all right, though not quite the same – like old Mr. Bilbo. But those aren’t always the best tales to hear, though they may be the best tales to get landed in!", "Lord of the Rings", "JRR Tolkien"],
["We may stand, if only on one leg, or at least be left still upon our knees.", "Lord of the Rings", "JRR Tolkien"],
["He longed to shut out the immensity in a quiet room by a fire.", "Lord of the Rings", "JRR Tolkien"],
["Yet it is not our part to master all the tides of the world, but to do what is in us for the succour of those years wherein we are set, uprooting the evil in the fields that we know, so that those who live after may have clean earth to till.", "Lord of the Rings", "JRR Tolkien"],
["And better so than to perish nonetheless – as we surely shall, if we sit here – and know as we die that no new age shall", "Lord of the Rings", "JRR Tolkien"],
["There, peeping among the cloud-wrack above a dark tor high up in the mountains, Sam saw a white star twinkle for a while. The beauty of it smote his heart, as he looked up out of the forsaken land, and hope returned to him. For like a shaft, clear and cold, the thought pierced him that in the end the Shadow was only a small and passing thing: there was light and high beauty for ever beyond its reach.", "Lord of the Rings", "JRR Tolkien"],
["At least, I know that such things happened, but I cannot see them. No taste of food, no feel of water, no sound of wind, no memory of tree or grass or flower, no image of moon or star are left to me. I am naked in the dark, Sam, and there is no veil between me and the wheel of fire. I begin to see it even with my waking eyes, and all else fades.", "Lord of the Rings", "JRR Tolkien"],
["Then suddenly, as before under the eaves of the Emyn Muil, Sam saw these two rivals with other vision. A crouching shape, scarcely more than the shadow of a living thing, a creature now wholly ruined and defeated, yet filled with a hideous lust and rage; and before it stood stern, untouchable now by pity, a figure robed in white, but at its breast it held a wheel of fire. Out of the fire there spoke a commanding voice.", "Lord of the Rings", "JRR Tolkien"],
["Many folk like to know beforehand what is to be set on the table; but those who have laboured to prepare the feast like to keep their secret; for wonder makes the words of praise louder.", "Lord of the Rings", "JRR Tolkien"],
["You have chosen the Evening; but my love is given to the Morning.", "Lord of the Rings", "JRR Tolkien"],
["He always was hasty. That was his ruin.", "Lord of the Rings", "JRR Tolkien"],
["It is useless to meet revenge with revenge: it will heal nothing.", "Lord of the Rings", "JRR Tolkien"],
["He is fallen, and his cure is beyond us; but I would still spare him, in the hope that he may find it.", "Lord of the Rings", "JRR Tolkien"],
["Go in peace! I will not say: do not weep; for not all tears are an evil.", "Lord of the Rings", "JRR Tolkien"],
//, "Ender's Game", "Orson Scott Card"
["Ender’s anger was cold, and he could use it. Bonzo’s was hot, and so it used him.", "Ender's Game", "Orson Scott Card"],
["There’s only one thing that will make them stop hating you. And that’s being so good at what you do that they can’t ignore you.", "Ender's Game", "Orson Scott Card"],
["And soldiers can sometimes make decisions that are smarter than the orders they’ve been given.", "Ender's Game", "Orson Scott Card"],
["It made Ender listen more carefully to what people meant, instead of what they said. It made him wise.", "Ender's Game", "Orson Scott Card"],
["Peace. It’s what salaam means. Peace be unto you.", "Ender's Game", "Orson Scott Card"],
["Ender mentally added him to his private list of people who also qualified as human beings.", "Ender's Game", "Orson Scott Card"],
["The power to cause pain is the only power that matters, the power to kill and destroy, because if you can’t kill then you are always subject to those who can, and nothing and no one will ever save you.", "Ender's Game", "Orson Scott Card"],
["He was a soldier, and if anyone had asked him what he wanted to be when he grew up, he wouldn’t have known what they meant.", "Ender's Game", "Orson Scott Card"],
["Ender Wiggin isn’t a killer. He just wins—thoroughly. If anybody’s going to be scared, let it be the buggers.", "Ender's Game", "Orson Scott Card"],
["Perhaps it’s impossible to wear an identity without becoming what you pretend to be.", "Ender's Game", "Orson Scott Card"],
["In the moment when I truly understand my enemy, understand him well enough to defeat him, then in that very moment I also love him. I think it’s impossible to really understand somebody, what they want, what they believe, and not love them the way they love themselves.", "Ender's Game", "Orson Scott Card"],
["Nature can’t evolve a species that hasn’t a will to survive. Individuals might be bred to sacrifice themselves, but the race as a whole can never decide to cease to exist.", "Ender's Game", "Orson Scott Card"],
["There is no teacher but the enemy. No one but the enemy will tell you what the enemy is going to do. No one but the enemy will ever teach you how to destroy and conquer. Only the enemy shows you where you are weak. Only the enemy tells you where he is strong. And the rules of the game are what you can do to him and what you can stop him from doing to you.", "Ender's Game", "Orson Scott Card"],
["Humanity does not ask us to be happy. It merely asks us to be brilliant on its behalf. Survival first, then happiness as we can manage it.", "Ender's Game", "Orson Scott Card"],
["It was to each other that they became close; it was with each other that they exchanged confidences.", "Ender's Game", "Orson Scott Card"],
["\“You don’t have to command anybody,\” said Dink, \“but you’re always our commander.\”", "Ender's Game", "Orson Scott Card"],
["It did not occur to them that this twelve-year-old boy might be as gifted at peace as he was at war.", "Ender's Game", "Orson Scott Card"],
["I’m going because I know the buggers better than any other living soul, and maybe if I go there I can understand them better. I stole their future from them; I can only begin to repay by seeing what I can learn from their past", "Ender's Game", "Orson Scott Card"],
["The humans did not forgive us, she thought.", "Ender's Game", "Orson Scott Card"],
//, "Speaker for the Dead", "Orson Scott Card"
["What man among you, if his son asks for bread, gives him a stone?", "Speaker for the Dead", "Orson Scott Card"],
["Sickness and healing are in every heart. Death and deliverance are in every hand.", "Speaker for the Dead", "Orson Scott Card"]
];
//document.getElementById("quoteJS").onload = function() {randQuote()};
/*
* This event pulls a random quote and its associated book, author, and series from the quotes[] array
* after the full web page has been loaded
*/
window.onload = (event) => {
var randNum = Math.floor(Math.random() * quoteBookAuthorSeries.length);
var quote = quoteBookAuthorSeries[randNum][0];
var book = quoteBookAuthorSeries[randNum][1];
var author = quoteBookAuthorSeries[randNum][2];
//console.log("<blockquote><p>"+quote+"</p><p>~ "+author+", <cite>"+book+"</cite></p></blockquote>");
var quoteElement = document.createElement('div');
quoteElement.innerHTML = "<blockquote><p>"+quote+"</p><p>~ "+author+", <cite>"+book+"</cite></p></blockquote>";
document.getElementById("quoteJS").appendChild(quoteElement);
};// end randQuote()