User:Joeytje50/konami.js

var Konami = function { var konami= { addEvent:function ( obj, type, fn, ref_obj ) {				if (obj.addEventListener) obj.addEventListener( type, fn, false ); else if (obj.attachEvent) {					// IE					obj["e"+type+fn] = fn; obj[type+fn] = function { obj["e"+type+fn]( window.event,ref_obj ); } obj.attachEvent( "on"+type, obj[type+fn] ); }			},	       input:"", pattern:function(keys) { var pattern = ''; for (i=0;i konami.pattern.length) konami.input = konami.input.substr((konami.input.length - konami.pattern.length));				if (konami.input == konami.pattern) {					konami.code(link);					konami.input="";                  			return;				}            		},this); this.iphone.load(link) },	       code: function(link) { window.location=link }, }	return konami; }

/*To use this, add the following:

var konami = new Konami; konami.pattern('EXAMPLE'); konami.link('http://example.com/');

This can be repeated as much as you want.*/