let carousel = document.getElementById('carousel');
clear_carousel(carousel);
- addheading(carousel, 5, "Current standings, Trøndisk 2018<br />" + group_name);
+ addheading(carousel, 5, "Current standings, " + ultimateconfig['tournament_title'] + "<br />" + group_name);
let tr = document.createElement("tr");
tr.className = "subfooter";
addth(tr, "rank", "");
let footer_tr = document.createElement("tr");
footer_tr.className = "footer";
let td = document.createElement("td");
- td.appendChild(document.createTextNode("www.trondheimfrisbeeklubb.no | #trøndisk"));
+ td.appendChild(document.createTextNode(ultimateconfig['tournament_footer']));
td.setAttribute("colspan", "5");
footer_tr.appendChild(td);
carousel.appendChild(footer_tr);
let carousel = document.getElementById('carousel');
clear_carousel(carousel);
- addheading(carousel, 3, "Stream schedule, Trøndisk 2018<br />" + covered_days.join('/') + " (all times CET)");
+ addheading(carousel, 3, "Stream schedule, " + ultimateconfig['tournament_title'] + "<br />" + covered_days.join('/') + " (all times CET)");
let teams_to_idx = make_teams_to_idx(teams);
row_num = 0;
req.onload = function(e) {
cb(JSON.parse(req.responseText), group_name);
};
- req.open('GET', 'https://sheets.googleapis.com/v4/spreadsheets/1DSRRcV6d6Dx9KbCZgOSFF0MX9wKRex9nHcUjjOG4DNE/values/\'' + group_name + '\'!A1:J50?key=AIzaSyAuP9yQn8g0bSay6r_RpGtpFeIbwprH1TU');
+ req.open('GET', 'https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['score_sheet_id'] + '/values/\'' + group_name + '\'!A1:J50?key=' + ultimateconfig['api_key']);
req.send();
}
--- /dev/null
+var ultimateconfig = {
+ 'tournament_title': 'Battle of Oak Hill 2019',
+ 'tournament_footer': 'ekebergsk.com | #us4',
+
+ // Share both sheets with ultimate-nm-2018@solskogen-cubemap.iam.gserviceaccount.com.
+ 'score_sheet_id': '1DSRRcV6d6Dx9KbCZgOSFF0MX9wKRex9nHcUjjOG4DNE',
+ 'roster_sheet_id': '1Mp6sWSxxvRl3YCCx4-RPlnCyuzkgNbJW1iCHnsH-9Ks',
+
+ 'api_key': 'AIzaSyAuP9yQn8g0bSay6r_RpGtpFeIbwprH1TU'
+};
<h1 id="callsheading">Calls</h1>
<ul id="calls">
</ul>
+<script src="config.js" type="text/javascript"></script>
<script src="quickhelp.js" type="text/javascript"></script>
</body>
</html>
text = text.replace(/\n/, '<br />');
let subtext = response.values[i][3];
if (subtext === undefined || subtext === '') {
- subtext = 'Trøndisk 2018';
+ subtext = ultimateconfig['tournament_title'];
}
l3s[prefix + number] = {
}
cb(l3s, sheet);
};
- req.open('GET', 'https://sheets.googleapis.com/v4/spreadsheets/1Mp6sWSxxvRl3YCCx4-RPlnCyuzkgNbJW1iCHnsH-9Ks/values/\'' + sheet + '\'!A1:J50?key=AIzaSyAuP9yQn8g0bSay6r_RpGtpFeIbwprH1TU');
+ req.open('GET', 'https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['score_sheet_id'] + '/values/\'' + sheet + '\'!A1:J50?key=' + ultimateconfig['api_key']);
req.send();
};
}
cb(team_name, roster);
};
- req.open('GET', 'https://sheets.googleapis.com/v4/spreadsheets/1Mp6sWSxxvRl3YCCx4-RPlnCyuzkgNbJW1iCHnsH-9Ks/values/\'' + sheet + '\'!A1:J50?key=AIzaSyAuP9yQn8g0bSay6r_RpGtpFeIbwprH1TU');
+ req.open('GET', 'https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['roster_sheet_id'] + '/values/\'' + sheet + '\'!A1:J50?key=' + ultimateconfig['api_key']);
req.send();
};
<script src="jsrsasign-all-min.js" type="text/javascript"></script>
+<script src="config.js" type="text/javascript"></script>
<script src="carousel.js" type="text/javascript"></script>
<script src="score.js" type="text/javascript"></script>
<script src="quickl3.js" type="text/javascript"></script>
"data": updates
};
possibly_update_oauth_key(function() {
- post_json('https://sheets.googleapis.com/v4/spreadsheets/1DSRRcV6d6Dx9KbCZgOSFF0MX9wKRex9nHcUjjOG4DNE/values:batchUpdate?key=AIzaSyAuP9yQn8g0bSay6r_RpGtpFeIbwprH1TU', json, function(response) {}, current_oauth_access_token);
+ post_json('https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['score_sheet_id'] + '/values:batchUpdate?key=' + ultimateconfig['api_key'], json, function(response) {}, current_oauth_access_token);
});
});