More on Mozilla Gaming
Thursday August 10th, 2000
Dan has also posted a version with an easter egg here.
Cheater! I knew the easter egg was going to be visible in the code as that is one of the disadvantages to using a scripting language. As a matter of fact that is why I made the function names so obvious, but did you have to blow it for everyone who didn't want to know?
As for the method I used it isn't as simple to fix as you make it sound. The XUL code I used only calls that function if one of the keys that spells MozillaRules is pressed, so your little piece of code wouldn't do any good. The only way to fix it would be to check the string every time one of the keys was pressed and reject the key if it wasn't the right one for the next letter in the string. However this would have the side effect of allowing someone to randomly start pressing keys on the keyboard and eventually the easter egg would show up.