[Bbs2ch-cvs 97] CVS update: bbs2chreader/content/bbs2chreader/res/skin-default

Back to archive index

flyson flyso****@users*****
2006年 5月 8日 (月) 14:52:21 JST


Index: bbs2chreader/content/bbs2chreader/res/skin-default/respopup.js
diff -u bbs2chreader/content/bbs2chreader/res/skin-default/respopup.js:1.3 bbs2chreader/content/bbs2chreader/res/skin-default/respopup.js:1.4
--- bbs2chreader/content/bbs2chreader/res/skin-default/respopup.js:1.3	Wed Mar  9 22:46:50 2005
+++ bbs2chreader/content/bbs2chreader/res/skin-default/respopup.js	Mon May  8 14:52:21 2006
@@ -54,6 +54,11 @@
 		document.addEventListener("mouseout", resPopup.doMouseOut, false);
 	},
 
+	done: function(){
+		document.removeEventListener("mouseover", resPopup.doMouseOver, false);
+		document.removeEventListener("mouseout", resPopup.doMouseOut, false);
+	},
+
 	/**
 	 * ƒŒƒXƒŠƒ“ƒN‚Ƀ}ƒEƒX‚ðæ‚¹‚½‚Æ‚«‚̃Cƒxƒ“ƒg
 	 *
@@ -127,17 +132,20 @@
 
 		divResPopup.appendChild(content);
 		document.body.appendChild(divResPopup);
-
-		
-		divResPopup.addEventListener("mouseout", function(aEvent){
-			if(aEvent.pageX <= this.offsetLeft ||
-						aEvent.pageY <= this.offsetTop ||
-						aEvent.pageX >= this.offsetLeft + this.offsetWidth ||
-						aEvent.pageY >= this.offsetTop + this.offsetHeight)
-				document.body.removeChild(this);
-		}, false);
+	
+		divResPopup.addEventListener("mouseout", resPopup.doPopupMouseOut, false);
 	},
 
+	doPopupMouseOut: function(aEvent){
+		if(aEvent.pageX <= this.offsetLeft ||
+				aEvent.pageY <= this.offsetTop ||
+				aEvent.pageX >= this.offsetLeft + this.offsetWidth ||
+				aEvent.pageY >= this.offsetTop + this.offsetHeight){
+
+			this.removeEventListener("mouseout", resPopup.doPopupMouseOut, false);
+			document.body.removeChild(this);
+		}
+	},
 
 	/**
 	 * ƒm[ƒh‚̃Nƒ[ƒ“‚ð–³–¼‚É‚µ‚Ä•Ô‚·
@@ -158,4 +166,5 @@
 
 
 
-window.addEventListener("load", resPopup.init, false);
\ No newline at end of file
+window.addEventListener("load", resPopup.init, false);
+window.addEventListener("unload", resPopup.done, false);
\ No newline at end of file
Index: bbs2chreader/content/bbs2chreader/res/skin-default/imgpopup.js
diff -u bbs2chreader/content/bbs2chreader/res/skin-default/imgpopup.js:1.2 bbs2chreader/content/bbs2chreader/res/skin-default/imgpopup.js:1.3
--- bbs2chreader/content/bbs2chreader/res/skin-default/imgpopup.js:1.2	Mon Feb 14 22:04:08 2005
+++ bbs2chreader/content/bbs2chreader/res/skin-default/imgpopup.js	Mon May  8 14:52:21 2006
@@ -62,6 +62,11 @@
 	},
 
 
+	done: function(){
+		document.removeEventListener("mouseover", ImagePopup.doMouseOver, false);
+		document.removeEventListener("mouseout", ImagePopup.doMouseOut, false);	
+	},
+
 	/**
 	 * ƒŠƒ“ƒN‚Ƀ}ƒEƒX‚ðæ‚¹‚½‚Æ‚«‚̃Cƒxƒ“ƒg
 	 *
@@ -146,4 +151,5 @@
 
 
 
-window.addEventListener("load", ImagePopup.init, false);
\ No newline at end of file
+window.addEventListener("load", ImagePopup.init, false);
+window.addEventListener("unload", ImagePopup.done, false);
\ No newline at end of file


bbs2ch-cvs メーリングリストの案内
Back to archive index