QUB1

Codes and Scripts => Qub1's only => Topic started by: Qub1 on February 25, 2009, 12:53:26 pm



Title: [CODE] The Secret Menu
Post by: Qub1 on February 25, 2009, 12:53:26 pm
Get a secret popup menu when typing the secret word.

A live preview is available on every page of this forum, just type alakazaam and the popup will open (try it, just type the word).

Add the following code to your headers:
Code:
<script language="JavaScript">
<!-- The Secret Menu -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
var nav=navigator.appName;
var ns=(nav.indexOf("Netscape")!=-1);

if(ns){
if(document.layers){
document.captureEvents(Event.KEYPRESS);
document.onkeypress = cheat;
}
if(document.getElementById){
document.onkeypress = cheat;
}
}
else
{document.onkeypress = cheat;}

var SpecialWord = "YOUR SECRET SPECIAL WORD HERE";
var SpecialLetter = 0;
var vcheat = false
function cheat(keyStroke)
{
 var eventChooser = (ns)?keyStroke.which: event.keyCode;
 var which = String.fromCharCode(eventChooser).toLowerCase();
 if(which == SpecialWord.charAt(SpecialLetter)){
   SpecialLetter++;
   if (SpecialLetter == SpecialWord.length) alert("YOUR SECRET POPUP TEXT HERE")
}
else {SpecialLetter = 0;vcheat = false}

}
</script>

There are some parts you need to edit of this code:
Replace the YOUR SECRET SPECIAL WORD HERE text with your secret word or phrase. This can be found in:
Code:
var SpecialWord = "YOUR SECRET SPECIAL WORD HERE";
And replace the YOUR SECRET POPUP TEXT HERE text with the secret text for your popup. This can be found in:
Code:
   if (SpecialLetter == SpecialWord.length) alert("YOUR SECRET POPUP TEXT HERE")

Any questions, i'm always ready to help =D.


Title: Re: [CODE] The Secret Menu
Post by: Didds on March 14, 2009, 04:34:57 am
Great idea! But I'm typing it and nothing happens  :-\


Title: Re: [CODE] The Secret Menu
Post by: Qub1 on March 16, 2009, 09:28:42 am
Oh, yeah i got a prob with my footers, fixing it now...  :-\