diff options
author | Andras Timar <andras.timar@collabora.com> | 2015-12-04 16:36:39 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-12-18 10:23:49 +0000 |
commit | a4acc2c9a4be44f2ff00e18c4c2146bd0323120c (patch) | |
tree | c4f36209a9fe3831a6cb3a0021193a7d52b5419a | |
parent | 2855ba0fcbe0c30777ea65cd4bbac273c8e7f718 (diff) |
shuffle list of candidates
Change-Id: If30bf0c6f11702189468e7c70afa66aa01aae2ef
Reviewed-on: https://gerrit.libreoffice.org/20402
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | vote/2015-board/candidates.wml | 4 | ||||
-rw-r--r-- | vote/2015-board/shuffle.js | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/vote/2015-board/candidates.wml b/vote/2015-board/candidates.wml index b950f04..1992019 100644 --- a/vote/2015-board/candidates.wml +++ b/vote/2015-board/candidates.wml @@ -45,7 +45,7 @@ <h2>Candidates for The Document Foundation Board of Directors</h2> - <p>In alphabetical order by surname:</p> + <p>In random order:</p> <ol> <li><strong>Thorsten Behrens</strong><br /> @@ -146,6 +146,6 @@ I've been a volunteer in the project since its creation five years ago. These da <a href="rules.html">Rules for this election</a> or write to <a href="mailto:elections@documentfoundation.org">elections@documentfoundation.org</a>. </p> - + <script src="shuffle.js" /> </body> </html> diff --git a/vote/2015-board/shuffle.js b/vote/2015-board/shuffle.js new file mode 100644 index 0000000..49a939a --- /dev/null +++ b/vote/2015-board/shuffle.js @@ -0,0 +1,8 @@ +window.onload = shuffle; + +function shuffle() { + var ol = document.querySelector('ol'); + for (var i = ol.children.length; i >= 0; i--) { + ol.appendChild(ol.children[Math.random() * i | 0]); + } +} |