[Affelio-cvs 1200] CVS update: affelio/defaults

Back to archive index

Tadashi Okoshi slash****@users*****
2006年 3月 28日 (火) 18:15:21 JST


Index: affelio/defaults/script.js
diff -u affelio/defaults/script.js:1.2 affelio/defaults/script.js:1.3
--- affelio/defaults/script.js:1.2	Thu Jun 30 16:06:53 2005
+++ affelio/defaults/script.js	Tue Mar 28 18:15:21 2006
@@ -16,3 +16,50 @@
 	return false;
 }
 
+function toggleExcerpt(id) {
+  var node = document.getElementById(id);
+  var newvalue=""; 
+
+  if (node.style.display == "none") {
+    newvalue="block";
+  } else {
+    newvalue="none";
+  }
+  node.style.display = newvalue;
+
+  xDay = new Date;
+  xDay.setHours(xDay.getHours() + 24);
+  xDay = xDay.toGMTString();
+  document.cookie = id + "=" + newvalue  + ";expires=" + xDay;
+}
+
+
+function loadstatus(id){
+    var node = document.getElementById(id);
+    var status = loadCookie(id);
+    if(status == "block"){
+       node.style.display = "block";
+    }
+}
+
+function loadCookie(arg){
+  if(arg){
+    cookieData = document.cookie + ";"
+    startPoint1 = cookieData.indexOf(arg);
+    startPoint2 = cookieData.indexOf("=",startPoint1);
+    endPoint = cookieData.indexOf(";",startPoint1);
+    if(startPoint2 < endPoint && startPoint1 > -1){
+        cookieData = cookieData.substring(startPoint2+1,endPoint);
+        cookieData = cookieData;
+        return cookieData;
+    }
+  }
+  return false;
+}
+
+window.onload = myonload;
+function myonload(){
+  loadstatus('advancedmenu1');
+  loadstatus('advancedmenu2');
+}
+


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