PageSourceSearch

https://www.dickmorris.com/wp-content/themes/dick-morris/js/addEvent.js?ver=7.0.4

js dickmorris.com collected 2026-09-25 18:47:46 UTC 1,250 bytes, 52 lines download raw bytes

1Array.prototype.inArray = function (value) {
2	var i;
3	for (i=0; i < this.length; i++) {
4		if (this[i] === value) {
5			return true;
6		}
7	}
8	return false;
9};
10
11function addEvent( obj, type, fn ) {
12	if (obj.addEventListener) {
13		obj.addEventListener( type, fn, false );
14		EventCache.add(obj, type, fn);
15	}
16	else if (obj.attachEvent) {
17		obj["e"+type+fn] = fn;
18		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
19		obj.attachEvent( "on"+type, obj[type+fn] );
20		EventCache.add(obj, type, fn);
21	}
22	else {
23		obj["on"+type] = obj["e"+type+fn];
24	}
25}
26	
27var EventCache = function(){
28	var listEvents = [];
29	return {
30		listEvents : listEvents,
31		add : function(node, sEventName, fHandler){
32			listEvents.push(arguments);
33		},
34		flush : function(){
35			var i, item;
36			for(i = listEvents.length - 1; i >= 0; i = i - 1){
37				item = listEvents[i];
38				if(item[0].removeEventListener){
39					item[0].removeEventListener(item[1], item[2], item[3]);
40				};
41				if(item[1].substring(0, 2) != "on"){
42					item[1] = "on" + item[1];
43				};
44				if(item[0].detachEvent){
45					item[0].detachEvent(item[1], item[2]);
46				};
47				item[0][item[1]] = null;
48			};
49		}
50	};
51}();
52addEvent(window,'unload',EventCache.flush);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.