(function(){ var welcome = "..............._............................_......................................................_......\n..............|.|..........................|.|....................................................|.|.....\n.__......_____|.|.___.___.._.__.___...___..|.|_.___...._.__.___.._..._....___.___.._.__..___..___.|.|.___.\n.\\.\\./\\././._.\\.|/.__/._.\\|.._..._.\\./._.\\.|.__/._.\\..|.._..._.\\|.|.|.|../.__/._.\\|.._.\\/.__|/._.\\|.|/._.\\\n..\\.V..V./..__/.|.(_|.(_).|.|.|.|.|.|..__/.|.||.(_).|.|.|.|.|.|.|.|_|.|.|.(_|.(_).|.|.|.\\__.\\.(_).|.|..__/\n...\\_/\\_/.\\___|_|\\___\\___/|_|.|_|.|_|\\___|..\\__\\___/..|_|.|_|.|_|\\__,.|..\\___\\___/|_|.|_|___/\\___/|_|\\___|\n..................................................................__/.|...................................\n.................................................................|___/....................................\n"; return console.log(welcome); })(); (function(){ return console.log("Want to play a game? Type start() into the console below and enjoy :-)") })(); var start = function(){ var canvas = document.createElement('canvas'); canvas.id = "gameCanvas"; canvas.width = "400"; canvas.height = "400"; canvas.style = "border: 1px solid black; background-color: #f0f0f0; justify-content: center; display: inline-flex;" document.body.getElementsByClassName("mail")[0].parentElement.parentElement.appendChild(canvas); var script = document.createElement('script'); script.src = "js/snake.js" document.body.appendChild(script); console.info("You can now play snake! Use your keyboard arrow keys to navigate. Press \'p\' to pause / restart. Good luck!"); console.info("ps: my personal best is currently at 75 - can you beat it? Let me know: fc@fabiocasutt.com"); window.an = window.an || []; window.an.push({'tms.event':'snake.js init'}); }