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); + }, + /** * XNÉ}EXð湽ƫÌCxg * @@ -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É}EXð湽ƫÌCxg * @@ -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