Update format name hack

It now no longer changes "[Gen 6] ..." to "[Gen 6] [Gen 6] ..."
This commit is contained in:
Guangcong Luo
2016-12-01 01:46:30 -05:00
parent c951a28f4e
commit 6bdfea8b09

View File

@@ -922,7 +922,9 @@
}
bufs[curBuf] += '<li><h3>' + Tools.escapeHTML(curSection) + '</li>';
}
var formatName = (curSection.slice(0, 4) === 'ORAS' ? '[Gen 6] ' : '') + Tools.escapeFormat(format.id).replace('[Gen 7] ', '');
var formatName = Tools.escapeFormat(format.id);
if (formatName.charAt(0) !== '[') formatName = '[Gen 6] ' + formatName;
formatName = formatName.replace('[Gen 7] ', '');
bufs[curBuf] += '<li><button name="selectFormat" value="' + i + '"' + (curFormat === i ? ' class="sel"' : '') + '>' + formatName + '</button></li>';
}