forgot about leagues, whoops
This commit is contained in:
parent
eb2c5797cb
commit
c931733ad1
|
@ -88,11 +88,20 @@ const insertGame = (gridboxnum, game) => {
|
||||||
const insertLeague = (league) => {
|
const insertLeague = (league) => {
|
||||||
var btn = document.createElement("BUTTON");
|
var btn = document.createElement("BUTTON");
|
||||||
btn.className = "filter";
|
btn.className = "filter";
|
||||||
btn.innerHTML = league;
|
btn.innerHTML = escapeHtml(league);
|
||||||
$('#filters').append(btn);
|
$('#filters').append(btn);
|
||||||
return btn;
|
return btn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function escapeHtml(unsafe) {
|
||||||
|
return unsafe
|
||||||
|
.replace(/&/g, "&")
|
||||||
|
.replace(/</g, "<")
|
||||||
|
.replace(/>/g, ">")
|
||||||
|
.replace(/"/g, """)
|
||||||
|
.replace(/'/g, "'");
|
||||||
|
}
|
||||||
|
|
||||||
const clearBox = (box) => {
|
const clearBox = (box) => {
|
||||||
box.className = "emptyslot";
|
box.className = "emptyslot";
|
||||||
box.timestamp = null;
|
box.timestamp = null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user