# HG changeset patch # User Arne Babenhauserheide # Date 1234884869 -3600 # Node ID a60f0ba020d98d3d7fa244a5bec594fd16bd4246 # Parent b5b71ff1c37f8287384a333223754c35529a15ef# Parent baf1530ba0b0b7cf0d6fe93d2bc9979993441313 merge ajax random quotes. diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/index.html --- a/src/en/index.html Tue Feb 17 15:51:29 2009 +0100 +++ b/src/en/index.html Tue Feb 17 16:34:29 2009 +0100 @@ -102,9 +102,7 @@
- Random testimony: "I understood how to install Mercurial and how to use it in a few minutes." -Giorgos Keramidas - + Random testimony: "I understood how to install Mercurial and how to use it in a few minutes." -Giorgos Keramidas
diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/javascript/main.js --- a/src/en/javascript/main.js Tue Feb 17 15:51:29 2009 +0100 +++ b/src/en/javascript/main.js Tue Feb 17 16:34:29 2009 +0100 @@ -15,7 +15,7 @@ var xmlhttp = null; -function loadXMLDoc(url) { +function loadXMLDoc(url, stateChange) { if (window.XMLHttpRequest) {// code for Firefox, Opera, IE7, etc. xmlhttp = new XMLHttpRequest(); } else if (window.ActiveXObject) {// code for IE6, IE5 @@ -30,7 +30,8 @@ } } -function stateChange() { +// client OS specific page section +function browserUsageRequestStateChange() { if (xmlhttp.readyState==4) {// 4 = "loaded" document.getElementById('replace').innerHTML = xmlhttp.responseText; } @@ -38,6 +39,21 @@ addLoadEvent(function () { if (navigator.appVersion.indexOf("Win")!=-1) { - loadXMLDoc("win.html"); + loadXMLDoc("win.html", browserUsageRequestStateChange); } }); + +// random quotes +function quoteRequestStateChange() { + if (xmlhttp.readyState==4) {// 4 = "loaded" + document.getElementById('quote').innerHTML = xmlhttp.responseText; + } +} + +function randomNumber(low, high) { + return Math.floor(Math.random()*(high-low+1))+low; +} + +addLoadEvent(function () { + loadXMLDoc("quotes/" + randomNumber(1, 17) + ".txt", quoteRequestStateChange); +}); diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/1.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/1.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: "I understood how to install Mercurial and how to use it in a few minutes." -Giorgos Keramidas diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/10.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/10.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: The included web server [...] replaces a lot of functionality of GUI tools in a truly multiplatform way. - Daniel Serpell diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/11.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/11.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: There isn't much to learn to be effective. - Doug Philips diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/12.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/12.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: It took my less than an hour to understand it. - Thomas Burdick diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/13.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/13.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: It has a tortoise so I can actually show my boss its highly productive even in windows. - Thomas Burdick diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/14.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/14.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: The commands usually do what I assume them to do. - Bastian Doetsch diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/15.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/15.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Mercurial's conceptual model is clean and simple enough to carry around in my head" - hgbook diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/16.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/16.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: It's so easy to start a project; hg init, and you're good to go. - Paul Fisher diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/17.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/17.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: It simply works [...]. - Hans Meine diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/2.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/2.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: Just works the way I expect - Paul Moore diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/3.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/3.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: It took me one evening to get comfortable with it. About a month to better understand its distributed nature. - Isaac Jurado diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/4.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/4.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: Mercurial strikes a marvelous balance between these two ends. It can be configured to support either simple environments or very complicated streams of changes interacting in custom ways, and it does all that without becoming a humongous monster of complexity. - Giorgos Keramidas diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/5.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/5.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: The dev's of Hg are generally friendly and approachable. - Gerard Korsten diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/6.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/6.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: The code base for Hg is pretty small and yet its pretty feature complete. - Gerard Korsten diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/7.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/7.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: Simplicity, being distributed, extensibility, speed, familiarity, bash completion, understandable and reasonably small code base - Peter Arrenbrecht diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/8.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/8.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: The team on the project gradually grew from just me to a few people here and abroad. This was a totally seamless experience - Peter Arrenbrecht diff -r b5b71ff1c37f -r a60f0ba020d9 src/en/quotes/9.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/quotes/9.txt Tue Feb 17 16:34:29 2009 +0100 @@ -0,0 +1,1 @@ +Random testimony: Easy to understand at a practical level. - Michael Estrand