window.SEVEN_COUNTER_OPTIONS = {
stats: false,
};
const displayedChar = char => ' ' === char
? '␣' : '\n' === char
? 'LF' : char;
const msgChars = (color, msg) => msg.map(c => `
${displayedChar(c.character)}
`).join('');
document.addEventListener('seven_counter_input',
({detail}) => Object.keys(detail).forEach(k => {
const value = detail[k];
document.getElementById(k).innerHTML =
'messages' === k
? value.map(msg =>
`${msgChars(new Color(detail), msg)}
`).join('')
: value;
}));