QUB1
March 29, 2024, 08:29:38 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Qub1! Here you can find all my scripts!

This site has got some secret previews. Below you can see how to find them:
What:                  How-to:
The secret menu - Type: alakazaam
 
  Home Help Search Gallery Staff List Login Register  

[CODE] The Secret Menu (multiple words mod) Warning

Pages: [1]
  Print  
Author Topic: [CODE] The Secret Menu (multiple words mod) Warning  (Read 576 times)
Qub1
Administrator
Newbie
*****

Rate: +0/-1
Posts: 13


View Profile
« on: March 01, 2009, 09:28:31 am »

First of all I would like to say that this code was made by the idea of a member on smfsupport (this is the topic). He brought me on the idea to make the code. First I wanted to modify the Secret Menu code for him, but it didn't work, so I totally re-writed the code and so the new code was created.

The code I present today has actually the same function as the secret menu code, exept that this version supports multiple words, so that the secret menu will popup on multiple inputs.

This is the code, it must be put in the Headers:
Code:
<script type="text/javascript">
<!-- The Secret Menu (multiple words mod) Warning -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
 
// Variables and handler configuration
var word = new Array(), Letter = new Array(), Code;
document.onkeypress = check_key;
 
// Forebidden Words
word[0] = "FOREBIDDEN WORD";
word[1] = "FOREBIDDEN WORD";
word[2] = "FOREBIDDEN WORD";
word[3] = "FOREBIDDEN WORD";
 
// Reset Counters
for (i = 0; i < word.length; i++) {
Letter[i] = 0;
}
 
// Event handler
function check_key(key) {
 
try {
Code = event.keyCode;
} catch(e) {
Code = key.which;
}
 
for (i = 0; i < word.length; i++) {
 
if (String.fromCharCode(Code).toLowerCase() == word[i].charAt(Letter[i])) {
Letter[i]++;
} else {
Letter[i] = 0;
}
 
if (Letter[i] == word[i].length) {
Letter[i] = 0;
trigger(word[i]);
}
 
}
}
 
// IF the word has been typed
function trigger(word) {
alert("YOUR POPUP MESSAGE HERE. You typed: " + word);
}
 
</script>

Just replace FORBIDDEN WORD with the words you don't allow, and if you want more words just enter more of this:
Code:
Code:
word[X] = "FOREBIDDEN WORD";
Replace the X with the correct number in the forbidden words list.

And edit the YOUR POPUP MESSAGE HERE text with the text you want to popup, and edit the You typed: text with whatever you want.

Thanks,
Qub1 out~
« Last Edit: March 16, 2009, 09:52:41 am by Qub1 » Report Spam   Logged

Share on Facebook Share on Twitter

Hacker
Newbie
*

Rate: +0/-0
Posts: 1


View Profile
« Reply #1 on: March 09, 2009, 09:20:53 pm »

alakazaam
Report Spam   Logged

Pages: [1]
  Print  
 
Jump to: