svnno****@sourc*****
svnno****@sourc*****
2010年 8月 12日 (木) 16:53:15 JST
Revision: 873 http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=873 Author: rsk Date: 2010-08-12 16:53:15 +0900 (Thu, 12 Aug 2010) Log Message: ----------- expack: - read.phpã®å¤æ´æ¼ããä¿®æ£ã - iPhoneç¨JavaScriptã§DOMContentLoadã¤ãã³ããç£è¦ãã ãªãã¸ã§ã¯ããwindowããdocumentã«å¤æ´ã Modified Paths: -------------- p2ex/trunk/js/ic2_iphone.js p2ex/trunk/js/iphone.js p2ex/trunk/js/iv2_iphone.js p2ex/trunk/js/sb_iphone.js p2ex/trunk/read.php -------------- next part -------------- Modified: p2ex/trunk/js/ic2_iphone.js =================================================================== --- p2ex/trunk/js/ic2_iphone.js 2010-08-11 16:25:24 UTC (rev 872) +++ p2ex/trunk/js/ic2_iphone.js 2010-08-12 07:53:15 UTC (rev 873) @@ -9,9 +9,7 @@ // }}} // {{{ DOMContentLoaded -window.addEventListener('DOMContentLoaded', function(event) { - this.removeEventListener('DOMContentLoaded', arguments.callee, false); - +document.addEventListener('DOMContentLoaded', function(event) { // {{{ initiaize ic2info._targetId = null; @@ -196,6 +194,8 @@ return function(){ ic2info.updateRank(n); }; })(i - 1); } + + document.removeEventListener('DOMContentLoaded', arguments.callee, false); }, false); // }}} Modified: p2ex/trunk/js/iphone.js =================================================================== --- p2ex/trunk/js/iphone.js 2010-08-11 16:25:24 UTC (rev 872) +++ p2ex/trunk/js/iphone.js 2010-08-12 07:53:15 UTC (rev 873) @@ -1248,9 +1248,7 @@ // }}} // {{{ DOMContentLoaded -window.addEventListener('DOMContentLoaded', function(event) { - window.removeEventListener('DOMContentLoaded', arguments.callee, false); - +document.addEventListener('DOMContentLoaded', function(event) { if (typeof window.iphone_js_no_modification === 'undefined' || !window.iphone_js_no_modification) { // NÉCxgnhðo^·é iutil.modifyExternalLink(document.body); @@ -1280,6 +1278,8 @@ } else if (!window.location.hash.length && iutil.getScrollX() < 1) { window.scrollTo(0, 1); } + + document.removeEventListener('DOMContentLoaded', arguments.callee, false); }, false); // }}} Modified: p2ex/trunk/js/iv2_iphone.js =================================================================== --- p2ex/trunk/js/iv2_iphone.js 2010-08-11 16:25:24 UTC (rev 872) +++ p2ex/trunk/js/iv2_iphone.js 2010-08-12 07:53:15 UTC (rev 873) @@ -4,9 +4,7 @@ // {{{ DOMContentLoaded -window.addEventListener('DOMContentLoaded', function(event) { - this.removeEventListener('DOMContentLoaded', arguments.callee, false); - +document.addEventListener('DOMContentLoaded', function(event) { var styleSheets = document.styleSheets; var commonStyle = styleSheets[styleSheets.length - 3]; var landscapeStyle = styleSheets[styleSheets.length - 2]; @@ -45,6 +43,8 @@ landscapeStyle.disabled = true; portraitStyle.disabled = true; } + + document.removeEventListener('DOMContentLoaded', arguments.callee, false); }, false); // }}} Modified: p2ex/trunk/js/sb_iphone.js =================================================================== --- p2ex/trunk/js/sb_iphone.js 2010-08-11 16:25:24 UTC (rev 872) +++ p2ex/trunk/js/sb_iphone.js 2010-08-12 07:53:15 UTC (rev 873) @@ -410,7 +410,7 @@ // }}} // {{{ on DOMContentLoaded - window.addEventListener('DOMContentLoaded', function(event) { + document.addEventListener('DOMContentLoaded', function(event) { // iutil/JSONªpÂ\ÉÈéÜÅÒ if (typeof window.iutil === 'undefined' || typeof window.JSON === 'undefined') @@ -418,7 +418,7 @@ window.setTimeout(arguments.callee, 50); } else { setup(window.iutil, window.JSON); - window.removeEventListener('DOMContentLoaded', arguments.callee, false); + document.removeEventListener('DOMContentLoaded', arguments.callee, false); } }, false); Modified: p2ex/trunk/read.php =================================================================== --- p2ex/trunk/read.php 2010-08-11 16:25:24 UTC (rev 872) +++ p2ex/trunk/read.php 2010-08-12 07:53:15 UTC (rev 873) @@ -29,7 +29,7 @@ $resFilter->save(); } } else { - ResFilter::restore(); + $resFilter = ResFilter::restore(); } //================================================= @@ -172,7 +172,7 @@ } // tB^OÌÍAallÅèÆ·é -if (isset($word)) { +if ($resFilter && $resFilter->word !== null) { $aThread->ls = 'all'; } @@ -243,7 +243,7 @@ // [JDatðÏ·µÄHTML\¦ //=========================================================== // Xª èAõwèª êÎ - if (isset($word) && $aThread->rescount) { + if ($resFilter && $resFilter->word !== null && $aThread->rescount) { $all = $aThread->rescount; @@ -282,7 +282,7 @@ //$GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection("datToHtml"); // tB^Êð\¦ - if ($word && $aThread->rescount) { + if ($resFilter && $resFilter->word !== null && $aThread->rescount) { echo <<<EOP <script type="text/javascript"> //<![CDATA[