I am working on a wordpress plugin that allows the user to enter the image URL and konami code . When the code is entered with cones, the image appears, but I can’t revive it, I’m not familiar with jQuery and Javascript, and I’m just starting to learn it ... Any help would be fantastic!
<script type="text/javascript" charset="utf-8"> if ( window.addEventListener ) { var kkeys = [], konami = "{$this->opts['wpk_code']['current']}"; window.addEventListener("keydown", function(e){ kkeys.push( e.keyCode ); if ( kkeys.toString().indexOf( konami ) >= 0 ){ var elms=document.getElementById("konami").style; elms.display=(elms.display=="block")?"none":"block"; } }, true); } </script>
Jamie source share