That is surprisingly easy to read, as long as I just sort of scan it and don't focus too much on the individual letters, but if I actually pay attention closely, I trip over the substitutions. Interesting to see the effects of different subconscious cognitive strategies at work.
5 comments
[ 2.2 ms ] story [ 25.3 ms ] threadcan i has job now
var mapping = sample.reduce((mapping, word) => { var leet = word[0], en = word[1]; var letters = leet.split(''); letters.forEach((letter, i) => { mapping[letter] = en[i]; }); return mapping }, {} )
var divs = [].slice.call(document.body.querySelectorAll('div'));
divs.forEach(div => { div.addEventListener('click', function(ev){ ev.stopPropagation(); div.textContent = div.textContent.split('').map(c => { var result = ''; if (c in mapping) { return mapping[c] } else { return c } }) .join('') }) })