function do_replacements(str, replacements) {
for (const r of replacements) {
str = str.replace(r[0], r[1]);
function do_replacements(str, replacements) {
for (const r of replacements) {
str = str.replace(r[0], r[1]);
for (const game of games) {
let team1 = do_replacements(game[0], replacements);
let team2 = do_replacements(game[1], replacements);
for (const game of games) {
let team1 = do_replacements(game[0], replacements);
let team2 = do_replacements(game[1], replacements);
let row = ultimateconfig['playoff_games_start_row'] + game[3];
let cols = ultimateconfig['playoff_games_cols'][game[2]];
let cell_team1 = "Results!" + String.fromCharCode(cols[0] + 65) + row;
let cell_score1 = "Results!" + String.fromCharCode(cols[1] + 65) + row;
let cell_score2 = "Results!" + String.fromCharCode(cols[2] + 65) + row;
let cell_team2 = "Results!" + String.fromCharCode(cols[3] + 65) + row;
let row = ultimateconfig['playoff_games_start_row'] + game[3];
let cols = ultimateconfig['playoff_games_cols'][game[2]];
let cell_team1 = "Results!" + String.fromCharCode(cols[0] + 65) + row;
let cell_score1 = "Results!" + String.fromCharCode(cols[1] + 65) + row;
let cell_score2 = "Results!" + String.fromCharCode(cols[2] + 65) + row;
let cell_team2 = "Results!" + String.fromCharCode(cols[3] + 65) + row;
- updates.push({ "range": cell_team1, "values": [ [ team1 ] ] });
- updates.push({ "range": cell_team2, "values": [ [ team2 ] ] });
+ updates.push({ "range": cell_team1, "values": [ [ team1_mediumname ] ] });
+ updates.push({ "range": cell_team2, "values": [ [ team2_mediumname ] ] });
let score1 = response['values'][row - 1][cols[1]];
let score2 = response['values'][row - 1][cols[2]];
let score1 = response['values'][row - 1][cols[1]];
let score2 = response['values'][row - 1][cols[2]];