[Bbs2ch-cvs 373] [355] 初回起動時に loadPersist () でエラーが出ていたのを修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 2月 7日 (木) 00:19:09 JST


Revision: 355
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=bbs2ch&view=rev&rev=355
Author:   flyson
Date:     2008-02-07 00:19:08 +0900 (Thu, 07 Feb 2008)

Log Message:
-----------
初回起動時に loadPersist() でエラーが出ていたのを修正

Modified Paths:
--------------
    trunk/bbs2chreader/chrome/content/bbs2chreader/board/page.js


-------------- next part --------------
Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/board/page.js
===================================================================
--- trunk/bbs2chreader/chrome/content/bbs2chreader/board/page.js	2008-02-06 15:18:15 UTC (rev 354)
+++ trunk/bbs2chreader/chrome/content/bbs2chreader/board/page.js	2008-02-06 15:19:08 UTC (rev 355)
@@ -135,14 +135,16 @@
 	var prefList = persistPref.getChildList("", {});
 	for(var i=0; i<prefList.length; i++){
 		var prefName = prefList[i];
-		var prefValue = persistPref.getCharPref(prefName);
-		var elementId = prefName.split(".")[0];
-		var attrName = prefName.split(".")[1];
-		var element = document.getElementById(elementId);
-		if(element){
-			element.setAttribute(attrName, prefValue);
-			if(attrName == "value") element.value = prefValue;
-		}
+		try{
+			var prefValue = persistPref.getCharPref(prefName);
+			var elementId = prefName.split(".")[0];
+			var attrName = prefName.split(".")[1];
+			var element = document.getElementById(elementId);
+			if(element){
+				element.setAttribute(attrName, prefValue);
+				if(attrName == "value") element.value = prefValue;
+			}
+		}catch(ex){}
 	}
 }
 


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