汎用日記帳 4.0.1

[diary:172198]
[beforeExec]

kiss = function(s){
s = s.replace(/(\(\*\^\(\^\* \)|\( \*\^\)\^\*\)|\(\*\^_\^\*\)\/?)/g, "\x3cspan class='kiss'>$1\x3c/span>");
s = s.replace(/(\\(\*⌒ー⌒\*\)/)/g, "\x3cspan class='kiss'>$1\x3c/span>");
s = s.replace(/(\(\*\^▽\^\*\)\/)/g, "\x3cspan class='mark2'>$1\x3c/span>");
s = s.replace(/(❤)/g, '\x3cspan class="harts">$1\x3c/span>');
return s;
};

subHeaderDisp = function(str){
var t0 = str.match(/\x3ctitle>(.+?)\x3c\/title/) ? RegExp.$1 : "";
t0 = t0.replace(/at eclat cyber city/, "");
var t1 = str.match(/id="site_info">(.*?)\x3c\/div/) ? RegExp.$1 : "";
if(t1 == "") t1 = "...";
echo("headerDisp", "\x3cdiv class='t0'>\x3cspan>" + t0 + "\x3c/span>\x3c/div>\x3cdiv class='t1'>" + t1 + "\x3c/div>"
);
};

Fx.s103 = function(s){
 var str = s.replace(/(href=")http:\/\/www\.eclat\.cc/g, "$1");
 str = str.replace(/(href=")(\/home\/[\w\-]+\/diary|\/cgi\-bin\/diary.cgi)([^"]*)/g, "$1main.html\?diary=172198\&uri=$2$3");

str = str.replace(/(\x3ca href=")\/home\/([\w\-]+)\/".*?>(.+?)(\x3c\/a>)/g,
'$1main.html?diary=172198\&user=$2">$3$4');
str = str.replace(/(href=")\/home\/([\w\-]+)i\/" target="_blank"/g, '$1main.html\?diary=172198\&user=$2"');

str = str.replace(/(href=")\/cgi-bin\/diary_form.+?id=(\d+")/g, "$1main.html\?diary=172231\&page=$2");
str = str.replace(/(href=")\/cgi-bin\/diary_editor.+?id=(\d+")/g, "$1main.html\?diary=172233\&page=$2");
str = str.replace(/(href="main\.html\?[^"]+") target="_blank"/g, "$1");
str = str.replace(/(\x3cdiv class="entry C\d+" id="A)(\d+)(">\s*\x3cdiv class="entry_date">)(\d{4} \d\d\/\d\d \d\d:\d\d)/g, '$1$2$3\x3cspan class="arc">A$2\x3c/span> at $4 \x3ca href="main.html?diary=172231\&page=$2" title="update">eDisp\x3c/a>');
str = str.replace(/(\x3cdiv class=")for-owner">(\x3ca href="main.html\?diary=172231\&page=)(\d+)">編集(\x3c\/a>)(\x3c\/div>)/, '$1disp_eDisp">A$3 : $2$3" title="edit">eDisp$4 / \x3ca href="/cgi-bin/diary_form.cgi?oid=yadokari;mode=edit;article_id=$3" title="normal_edit">normal_form$4$5');

return kiss(str);
};

entry = function(){
Fx.imgCNT = 0;
var uri = Fx.loc.match(/uri=(.+)/) ? RegExp.$1 : "/cgi-bin/diary.cgi?oid=yadokari";
Fx.user = uri.match(/(\/home\/|oid=)([a-z0-9\-]+)/) ? RegExp.$2 : "yadokari";


if(Fx.loc.match(/user=([\w\-]+)/)){
Fx.user = RegExp.$1; uri = "/cgi-bin/diary.cgi?oid=" + Fx.user;
}
modeDispEntry();
echo("fxUri", '\x3ca href="' + Fx.loc + '">Fx.uri\x3c/a>');
echo("userUri", '\x3ca href="' + uri + '" target="' + (Fx.user == 'yadokari' ? '_self' : '_blank') + '">User.uri\x3c/a>');

var m = Fid("modeDisp");
var all = Fx.user == "all";


if(all){
/*
var o = Fcn(Fid("sys21"), "div", "link");
echo(Ftag(o[0], "div")[0], "エントリー一覧");
Ftag(m, "ul")[0].style.display = "none";
uri = uri.replace(/(n=)\d+/, "$1100");
*/
} else {
/*
var a = Ftag(m, "a");
for(var i = 1; i < a.length; i++){
a[i].href = a[i].href.replace(/(user=)([\w\-]+)/,
function(e0,e1,e2){ return e1 + Fx.user; });
}
*/
}
if(uri.match(/diary.cgi/)){
uri = uri.replace(/(;n=)\d+/,"") + (Fx.user == "all" ? ";n=100;" : ";n=25");
}
Fx.e(uri, "no103Entry");

};
imgShow = function(src){
var obj = echo("imgDisp", "\x3cimg src=" + src + " />");

obj.style.top = (document.documentElement.scrollTop + 50) + "px";
obj.style.display = "block";
};
imgSrc = function(uri){
var a = Fx.imgCNT++;

var src = uri.match(/(href|src)=("[^"]+")/i) ? RegExp.$2 : "";
var obj = Fid("imgLinkDisp");
var o = Fap(obj, Fcea('javascript:imgShow(' + src + ')', "IMG-" + Fx.imgCNT));

o.className = "img_hack";
Fap(obj, Fctn(" "));
return '\x3ca class="img_hack" href=javascript:imgShow(' + src + ')>IMG-' + Fx.imgCNT + ' \x3c/a>';
};
Lo.no103Entry = function(str){
if(str.match(/\x3cdiv id="menu">(.+)\x3cdiv id="main">(.+)/)){
var m1 = RegExp.$1;
var m3 = m1.split("\x3chr />");
var m2 = RegExp.$2;
m2 = m2.replace(/\x3c\/div>\x3c\/body>\s*\x3c\/html>/, "");
if(!Fx.loc.match(/\d+\.html/)){
m2 = m2.replace(/(\x3ca [^>]+>)(\x3cimg[^>]+>)(.*?\x3c\/a>)/g, "$2 $1Link_image$3");
m2 = m2.replace(/\x3cimg([^>]+)>/g, function(e0,e1){ return imgSrc(e1); });
m2 = m2.replace(/\x3c\/?(font|center)[^>]*>/gi, "");
}
m2 = m2.replace(/(<h2>)(\d{4})年(\d\d)月の記事(<\/h2>)/,'$1for $2/$3/$4');
m2 = m2.replace(/(<h2>)(\d{4})年の記事(<\/h2>)/,'$1Index of $2$3');
m2 = m2.replace(/<dt>(\d{4})年(\d\d)月<\/dt>/g, function(e0,e1,e2){
return '<dt>\x3ca href="/home/'+ Fx.user + '/diary/' + e1 + '/' + e2 + '/">for ' + e1 + '/' + e2 + '/\x3c/a></dt>';});

m2 = m2.replace(/(\x3c)(div|span) style="[^"]+"/g, "$1$2");
m1 = m1.replace(/(\x3cli class="C)(\d+)/g, function(e0,e1,e2){ return e1 + ("00" + e2).slice(-3); });
m1 = m1.replace(/(\x3ca class="link_year"[^>]+>)(\d{4})(\x3c\/a>)/g, "$1Index of $2$3 for");
echo("menuEx1", '\x3cdiv id="m2ex">\x3c/div>\x3cdiv id="m2ex2">' + Fx.s103(m1) + '\x3c/div>');
echo("mainEx1", '\x3cdiv id="m3ex">' + Fx.s103(m2) + '\x3c/div>');
subHeaderDisp(str);
} else {
echo("mainEx1", "\x3cdiv class='nonUser'>\x3cspan>" + Fx.user + "\x3c/span> さんは退会しているかも知れません\x3c/div>");
}
if(Fx.user == "all") allDiaryEntry();

};
Lo.no103Entry.err = function(){
echo("mainEx1", "\x3cdiv class='nonUser'>ひとつもエクラの日記を書いていないみたいです\x3c/div>");
};

allDiaryEntry = function(){
var o = Fcn("main","div","import_cite");
var s = "",n = 1;

for(var i = 0; i < o.length; i++){
if(echo(o[i]).match(/user=([\w\-]+)/)) s += RegExp.$1 + " ";
}
s = s.replace(/^\s+|\s+$/g, "").split(" ").sort().join(" ") + " ";
 s = s.replace(/([\w\-]+ )(\1{0,})/g, function(e0,e1,e2){
  var f = e2.split(" ").length;
  return "<li>\x3cspan class='Res'>E:" + ("0" + (n++)).slice(-2) + "\x3c/span> \x3cspan class='all_oid'>\x3ca href='main.html?diary=172198&user=" + e1 + "'>" + e1 + "\x3c/a>\x3c/span> ( \x3cspan>" + f + "\x3c/span>件 )</li>";}

 );
var s1 = "\x3cdiv class='m2ex_box'><ul class='user_entry'>" + s + "</ul>\x3c/div>";
o = Fcn("main","div","entry_date");

s = "";
for(i = 0; i < o.length; i++){
if(echo(o[i]).match(/(\d{4}\s\d\d\/\d\d)/)) s += RegExp.$1 + " : ";
}


 s = s.replace(/(\d{4}\s\d\d\/\d\d\ : )(\1{0,})/g, function(e0,e1,e2){
  var f = e2.split(" : ").length;
  return "<li>\x3cspan class='D1'>" + e1 + "\x3c/span> \x3cspan class='D2'>" + f + "\x3c/span>人</li>";}

 );
s1 = "\x3cdiv class='m2ex_box'><ul class='days_count'>" + s + "</ul>\x3c/div>" + s1;
echo("m2ex",s1 );

};

[/beforeExec]
[cssText]
hr { display:none; }
html {
background:none; padding-left:0px;
}
hr { display:none; }
a { text-decoration:none; }
#showDisp { font-size:90%; }
#menu { width:30%; float:right; }
#main { margin-right:30%; }
.menu_logo { text-align:center; font:110%/1.2 "Times New Roman"; }

.menu_logo a { text-decoration:none; }

.link {
border:1px dashed orange; margin-bottom:1em;
border-radius:10px; -moz-border-radius:10px;
}
.link a { font-size:90%; }
.link_title { margin:.25em .5em; }

ul {
padding:0px; margin-left:26px; margin-top:0px;
margin-bottom:0px;
}
li { margin:0px; }

#menu ul { margin-top:0px; margin-right:.5em; }
#menu li { }

#archives a { font-family:"Times New Roman"; }
#archives li { color:#808080; }
a.link_year { color:tomato; font-weight:bold; }
#categories ul { margin-bottom:.5em; }
#categories li { color:orange; }
#categories li[class]:before {
border:1px solid #336; -moz-border-radius:10px; border-radius:10px;
padding-left:.25em; padding-right:.25em; background-color:#339; color:#fff;
content: attr(class); display:inline-block; margin-right:.5em;
font-family:"Comic Sans MS"; font-size:70%;

}
.menuBox { margin:1em .5em 1em 1em; }

#link_here,.link_here {
list-style-image:url(files/listitem.png);
}


#modeDisp {
padding:.5em 0 .25em 0;
background-color:#ffefff;
border:1px dashed orange;
-moz-border-radius:10px; border-radius:10px;
}
#menuMsg, .m2ex_box {
padding:.5em; margin-bottom:1em;
background-color:#ffefff;
border:1px dashed orange; font:90%/1.2 "Times New Roman"; color:#808080;
-moz-border-radius:10px; border-radius:10px;
}
#modeDisp div.link_info {
margin-left:1em; font-weight:bold;
padding-left:40px; line-height:35px;
font-family:"Times New Roman"; color:#808080;
background:url(files/hamu_folder2.gif) no-repeat;
}
#modeDisp div.link_info span { color:red; }

#modeDisp ul { margin-top:.5em; margin-bottom:.5em; }
#modeDisp ul li { margin-bottom:.25em; }
#modeDisp a { text-decoration:none; color:#000; }
#modeDisp a:hover { color:blue; }

.user_entry li { border:1px solid #fff; }
.user_entry li:hover {
background-color:yellow; border-bottom:1px solid tomato;
}

#mainExDisp {
padding:1em 0px;
}
#headerDisp {
background:url(files/yosei_2.gif) no-repeat; padding-left:62px;
min-height:60px; margin-bottom:.5em; color:navy;
text-shadow:3px 3px 6px #808080;
}
.t1 { margin-top:1em; font-size:80%; text-align:right;}

#m2ex .link {
margin-bottom:1em;
}
.nonUser { background:url(files/yukikko2b.gif) no-repeat center top;
padding-top:200px; text-align:center; padding-bottom:2em;
color:#808080;
}
.nonUser span { color:tomato; }

h2 {
font:bold 130%/30px "Times New Roman"; color:tomato;
background:url(files/hamu_folder1.gif) no-repeat; padding-left:40px;
padding-top:5px; margin:.5em;
}
dl * { padding:0; margin:0; list-style:none; }
dl dt { font:120%/1.4 "Times New Roman"; }
dl ul { background:url(files/kabe12.gif); }
dl li { font:100%/1.5 "Times New Roman"; }
.entry, #responses, dd {
background: url(http://www.nancyan.net/futari/ringnote.gif) repeat-y -5px top;
margin-bottom:1em; padding:.25em .5em .25em 60px;
border-top:1px solid #add8e6;
border-right:1px solid #add8e6;
border-bottom:1px solid #add8e6;
}
.entry_date {
text-align:right;
font:100%/1.3 "Times New Roman"; color:#808080;
}
.entry_date a { text-decoration:none; }
.entry_title {
background:url(files/y_line_b.gif) no-repeat;
padding-left:54px;
font-weight:bold; min-height:58px;
font-size:16px; line-height:50px;
}
.entry_title a { text-decoration:none; }
.entry_title a:link { color:steelblue; }
.entry_title a:visited { color:#808080; }
.entry_title a:hover { color:magenta; }
.entry_info {
text-align:right;
font:90%/1.5 "Times New Roman";
}
.entry_body {
background:url(files/kabe12.gif);
border-top:1px solid #ccc; border-bottom:1px solid #ccc;
padding:.5em; margin-top:1em; margin-bottom:1em;
line-height:1.3em; color:#000;
}
.entry_body a { text-decoration:none;}
.entry_body a:link { color:steelblue; }
.entry_body a:visited { color:brown; }
.entry_body a:hover { color:magenta; }
.entry_responses {
font:90%/1.2 Verdana; text-align:right;
}
.entry_responses a {
text-decoration:none;
}
.disp_eDisp {
font:100%/1.2 "Times New Roman"; color:#808080;
padding-bottom:.5em; text-align:right;
}
.comment_element {
background:url(http://www.nancyan.net/futari/blue_123.jpg) no-repeat;
padding-top:10px; padding-bottom:10px;
border-bottom:1px dashed #903;
}
.comment_element a[id]:before {
font-family:"Comic Sans MS"; color:#808080;
text-shadow:3px 3px 4px #a0a0a0;
}
.comment_element a[id]:after {
color:#808080; font-family:"Times New Roman";
text-shadow:3px 3px 4px #a0a0a0;
}
.comment_body {
display:block; font:100%/1.4 "Comic Sans MS";
text-indent:1em; color:#808080;
background:url(files/kabe12.gif);
}

.diaryCode { height:10em; overflow:auto;
background-color:#ffefff; color:lime;

font:95%/1.2 "MS Gothic"; padding:.25em;
}
.img_hack {
font:90%/1.3 "Times New Roman"; color:steelblue; background-color:#ff9;
display:inline-block; padding:0 .25em;
text-decoration:none;
border:1px solid #ff6; border-radius:3px; -moz-border-radius:3px;
}
#main .img_hack:before { color:red; content:"* "; }
.img_hack:hover {
background-color:#add8e6; color:tomato;
}
.img_hack:active {
background-color:orange; color:red;
}

#imgDisp {
position:absolute; top:-100px; left:100px; z-index:10;
cursor:pointer; border:2px solid orange; background-color:yellow;
padding:3px; border-radius:5px; -moz-border-radius:5px;
}

#imgLinkDisp {
line-height:1.5em;
border:1px dashed orange; padding:.5em; text-align:center;
border-radius:10px; -moz-border-radius:10px;
}
#imgLinkDisp a { min-width:50px; text-align:center; }
.form3 {
padding:.25em .5em; border:2px outset white;
border-radius:3px; -moz-border-radius:3px;
background-color:orange; color:#000; margin-bottom:1em;
}

.form3 a { color:gold; }

.form_title { margin-bottom:2px; }
.form_body { text-align:right; color:red; }
.form_body input { color:#333; margin-left:2px; }
.s1 {
font-size:90%; font-family:"Comic Sans MS"; color:#000;
text-shadow:2px 2px 2px #808080;
}

.s2 {
font-size:70%; color:#ccc;
text-shadow:2px 2px 2px #808080;
}
span.Res, span.post_no { border:1px solid darkgreen; -moz-border-radius:10px; border-radius:10px;
padding-left:.25em; padding-right:.25em; background-color:darkgreen; color:#fff;
font-family:"Comic Sans MS"; font-size:70%;
}
div.entry .entry_body div { font:100%/1.3 'Times New Roman'; }
.kiss { color:tomato; font-family:"MS UI Gothic";}
.mark2 { color:red; font-family:"MS UI Gothic"; }
.harts { color:hotpink; font-family:"MS UI Gothic"; font-size:200%; }
.page_link { text-align:center; margin-top:1em; }
[/cssText]

[body]
<$$div id="showDisp">
<$$div id="menu">
<$$div id="menuExDisp" class="menuBox"><$$/div>
<$$div id="menuEx1" class="menuBox"><$$/div>
<$$div id="menuMsg" class="menuBox">メニューについて。 <$$/div>
<$$div id="imgLinkDisp" class="menuBox"><$$/div>
<$$/div>

<$$div id="main"><$$div id="mainExDisp">
<$$div id="headerDisp"><$$/div>
<$$div id="mainEx1"><$$/div>
<$$/div><$$/div>

</$$div>
<$$div id="imgDisp" onclick="this.style.display = this.style.display == 'block' ? 'none' : 'block';"><$$/div>

[/body]
[exec]
document.title = "103 汎用日記帳 4.0.1";
entry();
[/exec]
[/diary:172198]

■仕様書