var konamiActivated = false; new Konami(function () { if (konamiActivated) return; konamiActivated = true; console.log('Cheat console activated. Have fun!'); // play nice soundtrack (new Audio('/assets/medias/sims2-university-theme.ogg')).play(); // substitute currency symbols with § var currencySymbols = /[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]/; document.body.innerHTML = document.body.innerHTML.replace(currencySymbols, "§"); // display cheat console var form = document.createElement('form'); form.classList.add('cheat-form'); form.setAttribute('method', 'post'); form.setAttribute('action', '/console'); var field = document.createElement('input'); field.setAttribute('type', 'text'); field.setAttribute('name', 'command'); field.setAttribute('autocomplete', 'off'); form.appendChild(field); document.getElementsByTagName('body')[0].appendChild(form); field.focus(); });