Merge pull request #135 from esSteres/indev
forgot about leagues, whoops
This commit is contained in:
commit
5aa1ae4b7b
|
@ -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