aboutsummaryrefslogtreecommitdiffstats
path: root/g/js
diff options
context:
space:
mode:
Diffstat (limited to 'g/js')
-rw-r--r--g/js/donators-list.js52
1 files changed, 27 insertions, 25 deletions
diff --git a/g/js/donators-list.js b/g/js/donators-list.js
index 2255f1b54..615b0c1ef 100644
--- a/g/js/donators-list.js
+++ b/g/js/donators-list.js
@@ -395,31 +395,33 @@ var previous_donors = [
'姜 奕轲',
];
-var donators = {};
-for (var i = 0; i < previous_donors.length; i++) {
- donators[previous_donors[i]] = previous_donors_url;
-}
-
-$.getJSON(donations_who_url, function(data) {
- for (var i = 0; i < data.length; i++) {
- donators[data[i].who] = data[i].url;
- }
- var sorted_donators = [];
- for (var d in donators) {
- if (donators.hasOwnProperty(d))
- sorted_donators.push(d);
+function thankyou_page() {
+ var donators = {};
+ for (var i = 0; i < previous_donors.length; i++) {
+ donators[previous_donors[i]] = previous_donors_url;
}
- sorted_donators.sort();
- var dlist = '';
- for (var i = 0; i < sorted_donators.length; i++) {
- dlist += '<li><a href="' + donators[sorted_donators[i]] + '">'
- + sorted_donators[i] + '</a></li>';
- };
- document.getElementById("donlist").innerHTML=dlist;
-});
+ $.getJSON(donations_who_url, function(data) {
+ for (var i = 0; i < data.length; i++) {
+ donators[data[i].who] = data[i].url;
+ }
+ var sorted_donators = [];
+ for (var d in donators) {
+ if (donators.hasOwnProperty(d))
+ sorted_donators.push(d);
+ }
+ sorted_donators.sort();
-$.getJSON(treasurer_infos_url, function(data) {
- document.getElementById("donations_30days").innerHTML=data.donations_30days;
- document.getElementById("last_update").innerHTML=data.last_update;
-});
+ var dlist = '';
+ for (var i = 0; i < sorted_donators.length; i++) {
+ dlist += '<li><a href="' + donators[sorted_donators[i]] + '">'
+ + sorted_donators[i] + '</a></li>';
+ };
+ document.getElementById("donlist").innerHTML=dlist;
+ });
+
+ $.getJSON(treasurer_infos_url, function(data) {
+ document.getElementById("donations_30days").innerHTML=data.donations_30days;
+ document.getElementById("last_update").innerHTML=data.last_update;
+ });
+}