const Mario = require('../../images/mario.gif') const Knmc = function(w) { this.window = w; } Knmc.prototype.init = function() { var chars = ''; var seq = '38384040373937396665'; var body = this.window.document.querySelector('body'); body.addEventListener('keyup', function(e) { chars += e.keyCode.toString(); if (chars.indexOf(seq) !== -1) { chars = ''; var url = Mario; var image = new Image(); image.classList.add('fixed'); image.style.position = 'fixed'; image.style.bottom = '-11px'; image.style.left = '-256px'; image.onload = function() { image.classList.add('knmc'); body.appendChild(image); } image.src = url; } }); } module.exports = Knmc