hopefully fixes quotes
This commit is contained in:
parent
9be516778f
commit
ecaebc1b2f
@ -44,13 +44,12 @@ window.getCookie = function(cname) {
|
|||||||
/* end stolen code; */
|
/* end stolen code; */
|
||||||
|
|
||||||
window.genQuote = function() {
|
window.genQuote = function() {
|
||||||
quotes = window.quotes;
|
if(window.quote != "") window.quotes.push(window.quote);
|
||||||
quote = window.quote;
|
quoteindex = Math.floor(Math.random() * window.quotes.length);
|
||||||
while(quote == window.quote) quote = Math.floor(Math.random() * quotes.length);
|
window.quote = window.quotes.splice(quoteindex, 1);
|
||||||
window.quote = quote;
|
|
||||||
document.getElementById('getaquote').setAttribute('value', 'Get another free quote today!');
|
document.getElementById('getaquote').setAttribute('value', 'Get another free quote today!');
|
||||||
document.getElementById('quote').textContent = '\"' + quotes[quote][0] + '\"';
|
document.getElementById('quote').textContent = '\"' + window.quote[0] + '\"';
|
||||||
document.getElementById('quoteauthor').textContent = '~ ' + quotes[quote][1];
|
document.getElementById('quoteauthor').textContent = '~ ' + window.quote[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
window.setStyling = function(sheet) {
|
window.setStyling = function(sheet) {
|
||||||
@ -73,12 +72,15 @@ window.quotes = [
|
|||||||
"Darth Vader" ],
|
"Darth Vader" ],
|
||||||
[ "A checklist can aid here.",
|
[ "A checklist can aid here.",
|
||||||
"Lance Leventhal" ]
|
"Lance Leventhal" ]
|
||||||
|
[ "Special thanks to Ками for their help adding quotes to this page.",
|
||||||
|
"Deven Blake" ]
|
||||||
];
|
];
|
||||||
</SCRIPT>
|
</SCRIPT>
|
||||||
<SCRIPT TYPE="application/javascript">
|
<SCRIPT TYPE="application/javascript">
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
var sheet = window.getCookie('sheet');
|
var sheet = window.getCookie('sheet');
|
||||||
if(sheet != '') window.setStyling(sheet);
|
if(sheet != '') window.setStyling(sheet);
|
||||||
|
window.quote = "";
|
||||||
};
|
};
|
||||||
</SCRIPT>
|
</SCRIPT>
|
||||||
<TABLE><TR><TD valign="top" width="50%">
|
<TABLE><TR><TD valign="top" width="50%">
|
||||||
|
Loading…
Reference in New Issue
Block a user