Implementing the Konami Code
#11
Did you manage to implement the first post code?
Reply
#12
If by first code you mean this:

<script type="text/javascript">
if (window.addEventListener) {
    var keys = [],
        konami = "38,38,40,40,37,39,37,39,66,65";
    
    window.addEventListener("keydown", function(e){
        keys.push(e.keyCode);
        
        if (keys.toString().indexOf(konami) >= 0) {
            alert("lulz");
            keys = [];
        };
    }, true);
};
</script> 

Then yes.
Reply
#13
Replace:
alert("lulz");

With:
$("#secret_modal").modal({fadeDuration:250,keepelement:!0});

And in your footer template add the following:
<div id="secret_modal" style="display: none;"><img src="https://img.4plebs.org/boards/s4s/image/1410/12/1410127055105.gif" /></div> 
Reply
#14
Thank you so much. And sorry for the bother, sometimes it takes me a while to understand things Toungue
Reply
#15
Thank you.
Seems like a useful therefore cool easter egg

I am going to try this now Big Grin
Reply
#16
Does this work with 1.6?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)