領域確保
領域確保

・取得ルーチン1,2とは異なり足跡のページじゃなくて足跡を主体とすること。
・掲示板をデータ領域に使わないこと。
・日記の中に埋め込んで自動アップデートさせること。
・多くの機能は組み込まないこと。
・取得は現存するログの一番古い日付と新しい日付を含めること。
・残した足跡のサイト数と件数を含めること。
・足跡の種類を数えること。
・言葉は少なめの数を数えること。
・足跡のサイトが存在していること。
・最新1週間を纏めること。
 ログを開く。
 足跡を配列に入れる。new-diary以外の足跡が求まる。
 ユーザ名の配列を作成。

 ・(A) データファイル 足跡に出てくる UID 退会した人も含む。
 ・(B) データファイル (B) 存在している UID
 ・(C) メッセージファイル ログメが無い時は「言葉は少なめ」となる。

 ・詳細ファイル
 B,no , 日付、訪問先、ログメ → 2021 11/24 01:49, 0, 1; 日付を数値化すると省エネ。

 誰が、いつ、どこに、ログメを残したか。全て数値で表す。
 最初のレコード 1, 1591011443, 0, 1

 div#responses
  div.comment
   div.comment_element
    a 編集
a.comment_auther#Cxxxxxx 名前
     → uid : no.記事番号だと欠番がでる。管理番号とセットで登録。
    : span.comment_body 60字
 フォーマット

 登録日時 16 最新日付 16 足跡先 4 足跡数 3 サイト数 3
 件数 3 カウンター:6 前日 3 過去平均 3

 名前を new-diary:1 ←管理番号を付ける。
 

  No. UID番号(3) 番号 登録日付 件数   最新訪問日付 最新訪問先
 123 new-diary  1 2019 10/11 100 2022 01/09 19:07 UID番号(3)

 登録日付  件数  最新訪問日付    最新訪問先 足跡先UID数 足跡数
 2019 10/11 100  2022 01/09 19:07 UID番号(3) 3 3



 最新の足跡




/* -- 汎用システム 基本関数 -- */ 
win = window;
doc = document;
Fid = a => typeof(a) == "object" ? a : doc.getEelementByid(a);
Ftag = (...a) => (a.length > 1 ? fid(a[0]) : doc).getElementsBytagName(a[a.length - 1]);
Fce = a => doc.createElement(a);
Fap = (a,b) => Fid(a).appendChild(b);
Fcn = (...a) => (a.length > 1 ? Fid(a[0]) : doc).getElementsByClassName(a[a.length - 1]);
Fres = o => o.responseText.replace(/\r?\n/g, "\t");
enc = s => encodeURIComponent(s);
tagDec = s => s.replace(/</g, "<").replace(/>/g, ">").replace(/”/g, "\x22");

/* -- 参照文字を実体に置換 -- */
fullDec = e => e.replace(/\x26quot;/g, "\"").
replace(/\x26amp;/g, "\x26").replace(/\x26lt;/g, "<").
replace(/\x26gt;/g, ">").replace(/\x26#39;/g, "'");

/* -- コードを実行可能に -- */
evalDec = e => fullDec(e).replace(/\/\*.*?\*\/\s/g, "").replace(/\x3cbr\s?\/?>/gi, "\n");

/* データの送受信の要で機能限定版。戻りにファイル更新日が入る */
xhr = (d1,d2,d3) => {
xmlPath = d1;
const a = new xmlHttpRequest();
a.onreadystatechange = () => {
if(a.readyState == 4){
if(a.status == 200){
d3(a.responseText.replace(/\r?\n/g, "\t"),
Math.floor((new Date(a.getResponseHeader("last-modified"))).getTime() / 1000)
);
} else d3("");
}
};
const mode = d1.match(/^[a-z0-9_]+$/) ? "post" : "get";
a.open(mode, mode == "get" ? d1.replace(/#.*$/, "") : "/cgi-bin/" + d1 + ".cgi", true);
a.setRequestHeader("content-type","application/x-www-form-urlencoded; charset=utf-8");
a.send(d2);
};

echo = (...a) => {
let n = a.length;
let o = typeof(a[0]) == "string" ? Fid(a[0]) : a[0];
if(o.tagName == "SELECT"){
if(n == 1) return o.options[o.selectedIndex].value;
else {
if(typeof(a[1]) == "string"){
if(a[1] != ""){
for(let i = o.options.length - 1; i >= 0; i--){
if(o.options[i].value == a[1]) break;
}
o.selectedIndex = i > 0 ? i : 0;
} else o.selectedIndex = 0;
} else o.selectedIndex = a[1];
}
} else {
type = o.tagName == "TEXTAREA" || o.tagName == "INPUT" ? "value" : "innerHTML";
if(n == 1) return o[type];
else {
if(n == 2){
let s = a[1];
if(typeof(s) == "object") s = s.join("");
o[type] = (s + "").replace(/\t/g, "\n");
} else {
let s = o[type];
if(a[2] == "add") o[type] = s + a[1];
if(a[2] == "math") o[type] = Number(s) + a[1];
}
}
}
return o;
};

/* -- キーのデータ取り出し -- */
keysn = (a,b,c) => {
let ex = "";
let dat = a.match(new regExp("\\[(" + b + "\\])" +
(c ? ".*?" : "(.*?)") + "\\[\\/\\1",c ? "g" : "")
);
if(!c){
if(dat) ex = regExp.$2;
} else {
let re = new regExp("\\[\\/?" + b + "\\]", "g");
if(c == 1) ex = dat.join(" ").replace(re, "");
else {
dat.forEach((e,i,o) => o[i] = e.replace(re, ""));
ex = dat;
}
}
return ex;
};

key = (a, b) => keysn(a, b, 0);
keys = (a, b) => keysn(a, b, 1);
keysArray = (a, b) => keysn(a, b, 2);

{
xhr(`/home/new-diary/links.css?${(new Date()).getTime()}`, null, e => {
try { eval(e.replace(/\t/g, "\n")); }
catch (err) { alert("new-diary/links.cssのプログラムエラーです\n\n" + err); }
});
}




/* */