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": {
local: "templates/public-teammgmt.html",
size: 10204,
modtime: 1506689947,
size: 10350,
modtime: 1516991375,
compressed: `
H4sIAAAJbogA/+xa2Y/buBl/n7+CVQPYRsf2Ft3Ngy9ss5NdBMimxc4MimKRB1qibTaUaIiUJ+7A/3s/
HpJIibI1kwMoNvMyEo/v/H0HaT0+ohdFQRM0W6LJHUn3DEtygyWe3N+/uUGn09UioQcUMyzEMopJJkke
ra4QcocZ2Ug9CMO7v60eH31K73BKTqfFFKbsmhxNNY0pEFldWWp2cl1IyTNEk2VEEirHW9g9NoMR4lnM
aPxhGf0HH7CIc7qXsy2X/I7g9BdYeIfXw9E8KgXbF3m5dyz5dsvIeENzIZEz4T6P9zlNcX6MVooYuiES
UyYWUzPbIaAE3uOUpGuSi16C/qrXXhYVJjxJo5Xajcx2TyrfkA3bSbyOXE+hNd2OxR7HpPTZhuepJ4ce
qJ7GmNFtRpII4VhSni2jqdJ5WmHndJoKfCCKW4RSInccBPjnP27vLAPFghKWCCLLARjCKIMNy8hsmzoz
ABStqXJCDRs95aBOyxfzTOacjbc5L/ZRvRCWMrwmrEKuXacHIwRqGcZKBOvtd5qbXuDRodm+kNqm1QZH
cvN+wKyAAbCID31FWOMfbBQhGI/JjrOEAPeKpyO19eMX05bR7IPV9l9kLajsobDe4yhs3s8q/BaWdCj8
Vkvw1RROiIij1Q0xEQjYDekryUeJc4IrlfUuR2Xz7injkJxMJtEqbAhnFVIZsOT0TAOgnEAIjfcFY74t
MNrlZBOISye9MLCOin4d+d0JkGEKieYnnMWELabYY2PXy+MeDCOKdUqlzyCn291FDmWKvd8nYCwb5G6G
bdllMfXTB7xDWrLP/SBzDi6r2zgnJBM7LkUDH+3iB8mQoR3P6X+BBm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kN/P3QLMkf5iwPMbaEEt0MjGZfm8a/UVppPKOIHKiToBz
h2rT+xyvA0qZYAorFVSnUqIO5ZrDe+NP7dej59DQ+cmqTjdDXRDFDzvVuSfDkQ8m38mNm+8z1RElyGwT
jpkhtVWLnFHl/hmK/p2Xgz1BKU4IEjk0+LHZf61cj3ZAMhtAGtKk4aiRogOR1+p0eshLpMKOZiVRMwdw
FmNoTRDLhZxEDqcaQ65zfXsHxEanYPUEDHHIBFxa+sPR3JsMHmS9FW6G7kFRSK2fcvQKO5mnTx9bOUIa
1ZwbVu+rrFPlCnOhUgmwxxyZ4qw0gWjpTZ2h5mIwameB+SW4a/ccYeQNOxef9jg5amHSpKRGi5bGyJma
6FozsZULqivkiQ9Rta5X91RpMla8QGNDYkdULC8Hf335XfFx0ORhP2pbcWnNPp0CeAmc+iEo1CUwFBn9
a5AOHhtOSRXavUJVPxGASJoN+tMSDU7+TDAAAapqpbw1t5g8x0Xdy1/Axd7Nn+AC6CnXt5LDae40R3Ut
XnEcKZbuzh72/i3cYNQjhmv85pTqu2ANwET6uucCP3iHO89Mn2Lv9sHt+QjaE9rzEdRHrYvI2aENhtTT
LW2ub6FXr8taVkA+gn8nnOhz3nD6G/8tm26vURTZ2A6t8VdY1rCkw7eV5pvg/EX9FuJF5tXJ9NCJxLOB
OD9P0Au6szF3AUE3pvoJtqJo7tvECRjzu8lptuHQUEA5I29vFDxlbxvwT9nrY7va6eOn83XAF+vH/ui8
1F/3a4z/27arF4Dt71J0hwXCvIVz7gQnsCIk0+hsB9P3OYlHn+ufDj6LRfVZSJCuuST/JGnbJLUpfHrd
7ivwVcwfIfpVQtT9Dul3FqTPEETn4vRz80AwSAMR9VkRGg76OkghAltXNZMdFju0hFr7Z0tzUGGvB1bH
q8W0uhD8XwAAAP//sEEPq24oAAA=
`,
},

View File

@ -215,7 +215,7 @@
// Check if Game Details changed
if(document.getElementById('gamename').value != '{{ .TemplateData.Game.Name }}') { 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
if(document.getElementById('newmembername').value != '') { return true; }
if(document.getElementById('newmemberslackid').value != '') { return true; }
@ -224,6 +224,12 @@
return false;
}
function scrubString(inp) {
inp = inp.replace(/\r\n/g, "");
inp = inp.replace(/\n/g, "");
return inp
}
function revertChanges() {
// Reset Team Name
document.getElementById('teamname').value = '{{ .TemplateData.Name }}';

View File

@ -177,7 +177,7 @@
// Check if game details have changed
if(document.getElementById('gamename').value != '{{ .TemplateData.Game.Name }}') { 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
if(document.getElementById('newmembername').value != '') { return true; }
if(document.getElementById('newmemberslackid').value != '') { return true; }
@ -186,6 +186,12 @@
return false;
}
function scrubString(inp) {
inp = inp.replace(/\r\n/g, "");
inp = inp.replace(/\n/g, "");
return inp
}
function revertChanges() {
// Reset game details
document.getElementById('gamename').value = '{{ .TemplateData.Game.Name }}';