rem: if (type == 'json') { this.id = data.id; this.notificationClass = data.notificationClass; this.type = data.type; this.headline = data.headline; this.datetime = MochiKit.DateTime.isoTimestamp(data.datetime); this.place = data.place; this.infotext = data.infotext; this.infolinktext = data.infolinktext; this.infolinkhref = data.infolinkhref; this.golinktext = data.golinktext; this.golinkhref = data.golinkhref; } else if (type == 'xml') { var notif = data; this.id = notif.getAttribute('id'); this.notificationClass = notif.getAttribute('class'); this.type = notif.getAttribute('type'); if (notif.getElementsByTagName('headline')[0] != null) this.headline = notif.getElementsByTagName('headline')[0].textContent;   if (this.notificationClass == 'event') { var eventInfo = notif.getElementsByTagName('eventinfo')[0]; this.datetime = MochiKit.DateTime.isoTimestamp( eventInfo.getElementsByTagName('datetime')[0].textContent); this.place = eventInfo.getElementsByTagName('place')[0].textContent; } this.infotext = notif.getElementsByTagName('infotext')[0].textContent; this.infolinktext = notif.getElementsByTagName('infolink')[0].textContent; this.infolinkhref = notif.getElementsByTagName('infolink')[0] .getAttribute('href'); this.golinktext = notif.getElementsByTagName('golink')[0].textContent; this.golinkhref = notif.getElementsByTagName('golink')[0] .getAttribute('href'); } 
add: if (type == 'json') { this.id = data.id; this.notificationClass = data.notificationClass; this.type = data.type; this.headline = data.headline; this.datetime = MochiKit.DateTime.isoTimestamp(data.datetime); this.place = data.place; this.infotext = data.infotext; this.infolinktext = data.infolinktext; this.infolinkhref = data.infolinkhref; this.golinktext = data.golinktext; this.golinkhref = data.golinkhref; } else if (type == 'xml') { var notif = data; this.id = notif.getAttribute('id'); this.notificationClass = notif.getAttribute('class'); this.type = notif.getAttribute('type'); if (notif.getElementsByTagName('headline')[0] != null) this.headline = notif.getElementsByTagName('headline')[0].textContent;   if (this.notificationClass == 'event') { var eventInfo = notif.getElementsByTagName('eventinfo')[0]; this.datetime = MochiKit.DateTime.isoTimestamp( eventInfo.getElementsByTagName('datetime')[0].textContent); this.place = eventInfo.getElementsByTagName('place')[0].textContent; } this.infotext = notif.getElementsByTagName('infotext')[0].textContent; this.infolinktext = notif.getElementsByTagName('infolink')[0].textContent; this.infolinkhref = notif.getElementsByTagName('infolink')[0] .getAttribute('href'); this.golinktext = notif.getElementsByTagName('golink')[0].textContent; this.golinkhref = notif.getElementsByTagName('golink')[0] .getAttribute('href'); } 
context: function Notification(type, data) {	if (type == 'json') {		this.id = data.id;		this.notificationClass = data.notificationClass;		this.type = data.type;		this.headline = data.headline;		this.datetime = MochiKit.DateTime.isoTimestamp(data.datetime);		this.place = data.place;		this.infotext = data.infotext;		this.infolinktext = data.infolinktext;		this.infolinkhref = data.infolinkhref;		this.golinktext = data.golinktext;		this.golinkhref = data.golinkhref;	} else if (type == 'xml') {		var notif = data;		this.id = notif.getAttribute('id');		this.notificationClass = notif.getAttribute('class');		this.type = notif.getAttribute('type');		if (notif.getElementsByTagName('headline')[0] != null)			this.headline = notif.getElementsByTagName('headline')[0].textContent;				// eventinfo		if (this.notificationClass == 'event') {			var eventInfo = notif.getElementsByTagName('eventinfo')[0];			this.datetime = MochiKit.DateTime.isoTimestamp(				eventInfo.getElementsByTagName('datetime')[0].textContent);			this.place = eventInfo.getElementsByTagName('place')[0].textContent;		}		this.infotext = notif.getElementsByTagName('infotext')[0].textContent;		this.infolinktext = notif.getElementsByTagName('infolink')[0].textContent;		this.infolinkhref = notif.getElementsByTagName('infolink')[0]			.getAttribute('href');		this.golinktext = notif.getElementsByTagName('golink')[0].textContent;		this.golinkhref = notif.getElementsByTagName('golink')[0]			.getAttribute('href');	}}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/a3a9a2c311afc9d76e4e6bfc036e5897fa988bc1/notifications.js/clean/testing/extensions/community/chrome/content/notifications.js