Scrub newlines out of game descriptions

This commit is contained in:
Brian Buller 2018-01-26 12:31:06 -06:00
parent 8afac6a29b
commit 9b03710ed0
3 changed files with 55 additions and 42 deletions

View File

@ -12181,47 +12181,48 @@ AAAA//9ablv2IQMAAA==
"/templates/public-teammgmt.html": { "/templates/public-teammgmt.html": {
local: "templates/public-teammgmt.html", local: "templates/public-teammgmt.html",
size: 10204, size: 10350,
modtime: 1506689947, modtime: 1516991375,
compressed: ` compressed: `
H4sIAAAJbogA/+xa2Y/buBl/n7+CVQPYRsf2Ft3Ngy9ss5NdBMimxc4MimKRB1qibTaUaIiUJ+7A/3s/ H4sIAAAJbogA/+xa2Y/buBl/n7+CVQPYRsf2Ft3Ngy9ss5NdBMimxc4MimI3D7RE22yoAyTliTvw/96P
HpJIibI1kwMoNvMyEo/v/H0HaT0+ohdFQRM0W6LJHUn3DEtygyWe3N+/uUGn09UioQcUMyzEMopJJkke hyRSomxPMglQ7M5DIvH4zt93kNbjI3pRljRBsyWa3JG0YFiSGyzx5P7+zQ06Hq8WCd2jmGEhllFMMkl4
ra4QcocZ2Ug9CMO7v60eH31K73BKTqfFFKbsmhxNNY0pEFldWWp2cl1IyTNEk2VEEirHW9g9NoMR4lnM tLpCyB1mZCP1IAzv/rZ6fPQpvcMpOR4XU5iyaziaahpTILK6stTs5LqUMs8QTZYRSagcb2H32AxGKM9i
aPxhGf0HH7CIc7qXsy2X/I7g9BdYeIfXw9E8KgXbF3m5dyz5dsvIeENzIZEz4T6P9zlNcX6MVooYuiES RuMPy+g/eI9FzGkhZ9tc5ncEpz/Bwju8Ho7mUSVYUfJq71jm2y0j4w3lQiJnwn0eF5ymmB+ilSKGbojE
UyYWUzPbIaAE3uOUpGuSi16C/qrXXhYVJjxJo5Xajcx2TyrfkA3bSbyOXE+hNd2OxR7HpPTZhuepJ4ce lInF1Mz2CCiB9zgl6ZpwcZGgP+u150WFCU/SaKV2I7Pdk8o3ZMt2Eq8j11NoTbdjUeCYVD7b5Dz15NAD
qJ7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8Hf335XfFx0ORhP2pbcWnNPp0CeAmc+iEo1CUwFBn9
BungseGUlKHdKVT5EwGIpNmgPy3R4OzPBAMQoKxWyltzi8lLXNS9fA8u9m7+uVzUVXgPLv5lWxcz18T1 a5AOHhtOSRXavUJVPxGASJoN+tMSDU7+TDAAAapqpbw1t5g8x0Xdy1/Axd7Nn+AC6CnXt5LDae40R3Ut
WdQ39Brgh/SlTg9re0c4T8zn6Ns8nn0+gvYc9vkI6gNVL3J2aIMhwbQLWCOp1qHwm/rlwYuDq7PB2ML9 XnEcKZbuzh72/i3cYNQjhmv85pTqu2ANwET6uucCP3iHO89Mn2Lv9sHt+QjaE9rzEdRHrYvI2aENhtTT
RdjPLxP0IH4R4T0IemjuC+a5bxMHuOZXivNswxBVDrsgbycan7K3Cbyn7PUxVu708dP6Lf6LdT/f+hz1 LW2ub6FXr8taVkA+gn8nnOhz3nD6G/8tm26vURTZ2A6t8VdY1rCkw7eV5pvg/EX9FuJF5tXJ9NCJxLOB
1/724f+2yekEYPMrEN3PgDBv4VQ5wQmsCMk0utgvdH284dHP9UX9J7EoP8II0jVX0s+StklSm8Kn1+51 OD9P0Au6szF3AUE3pvoJtqJo7tvECRjzu8lptuHQUEA5I29vFDxlbxvwT9nrY7va6eOn83XAF+vH/ui8
At+gfAvRrxKi7lc/f7Ag/QxBdClOPzUPBIM0EFGfFKHhoK+CFCKwcTEy2WGxQ0uotX+2NAcl9jpgdbpa 1F/3a4z/27arF4Dt71J0hwXCvIVz7gQnsCIk0+hsB9P3OYlHn+ufDj6LRfVZSJCuuST/JGnbJLUpfHrd
TMvrt/8FAAD//x6rSUXcJwAA 7ivwVcwfIfpVQtT9Dul3FqTPEETn4vRz80AwSAMR9VkRGg76OkghAltXNZMdFju0hFr7Z0tzUGGvB1bH
q8W0uhD8XwAAAP//sEEPq24oAAA=
`, `,
}, },

View File

@ -215,7 +215,7 @@
// Check if Game Details changed // Check if Game Details changed
if(document.getElementById('gamename').value != '{{ .TemplateData.Game.Name }}') { return true; } if(document.getElementById('gamename').value != '{{ .TemplateData.Game.Name }}') { return true; }
if(document.getElementById('gamelink').value != '{{ .TemplateData.Game.Link }}') { return true; } if(document.getElementById('gamelink').value != '{{ .TemplateData.Game.Link }}') { return true; }
if(document.getElementById('gamedesc').value != '{{ .TemplateData.Game.Description }}') { return true; } if(scrubString(document.getElementById('gamedesc').value) != scrubString('{{ .TemplateData.Game.Description }}')) { return true; }
// Check if new member details have been entered // Check if new member details have been entered
if(document.getElementById('newmembername').value != '') { return true; } if(document.getElementById('newmembername').value != '') { return true; }
if(document.getElementById('newmemberslackid').value != '') { return true; } if(document.getElementById('newmemberslackid').value != '') { return true; }
@ -224,6 +224,12 @@
return false; return false;
} }
function scrubString(inp) {
inp = inp.replace(/\r\n/g, "");
inp = inp.replace(/\n/g, "");
return inp
}
function revertChanges() { function revertChanges() {
// Reset Team Name // Reset Team Name
document.getElementById('teamname').value = '{{ .TemplateData.Name }}'; document.getElementById('teamname').value = '{{ .TemplateData.Name }}';

View File

@ -177,7 +177,7 @@
// Check if game details have changed // Check if game details have changed
if(document.getElementById('gamename').value != '{{ .TemplateData.Game.Name }}') { return true; } if(document.getElementById('gamename').value != '{{ .TemplateData.Game.Name }}') { return true; }
if(document.getElementById('gamelink').value != '{{ .TemplateData.Game.Link }}') { return true; } if(document.getElementById('gamelink').value != '{{ .TemplateData.Game.Link }}') { return true; }
if(document.getElementById('gamedesc').value != '{{ .TemplateData.Game.Description }}') { return true; } if(scrubString(document.getElementById('gamedesc').value) != scrubString('{{ .TemplateData.Game.Description }}')) { return true; }
// Check if new member details have been entered // Check if new member details have been entered
if(document.getElementById('newmembername').value != '') { return true; } if(document.getElementById('newmembername').value != '') { return true; }
if(document.getElementById('newmemberslackid').value != '') { return true; } if(document.getElementById('newmemberslackid').value != '') { return true; }
@ -186,6 +186,12 @@
return false; return false;
} }
function scrubString(inp) {
inp = inp.replace(/\r\n/g, "");
inp = inp.replace(/\n/g, "");
return inp
}
function revertChanges() { function revertChanges() {
// Reset game details // Reset game details
document.getElementById('gamename').value = '{{ .TemplateData.Game.Name }}'; document.getElementById('gamename').value = '{{ .TemplateData.Game.Name }}';