自我介紹
夫乘天地之正 御六氣之辯 以游於無窮 是為逍遙。
';
koChkSvr.innerHTML = '
function kofSetCookie(name, value, expiredays) {
var koExpireDate = new Date(nowTimeSerial() + (expiredays * 1000 * 60 * 60 * 24));
if (value == '') {value = '!@#koNull#@!';}
cookie = name + '=' + escape(value);
if (expiredays != null) {cookie += '; expires=' + koExpireDate.toGMTString();}
document.cookie = cookie;
}
function kofGetCookie(name) {
if (document.cookie.length > 0) {
start = document.cookie.indexOf(name + '=');
if (start > -1) {
start = start + name.length + 1;
end = document.cookie.indexOf(';', start);
if (end == -1) end = document.cookie.length;
value = unescape(document.cookie.substring(start, end));
if (value == '!@#koNull#@!') {value = '';}
return value;
}
}
return '';
}
koUser = ''; koUser = kofGetCookie('koUser');
//
function DebugPrint(msg) {
if (koUser == 'debug') {
var koDebug = document.getElementById('koDebug');
koDebug.innerHTML += '
' + nowDateTime() + ' ' + msg;
}
}
function DebugAlert(msg) {if (koUser == 'debug') {alert(msg);}}
//
function probeSvr() {
cBuf = ''; svrChecking = true;
for (s=0; s 1) {
srh = 1; while (svrOnlineS[srh].substr(0, 1) == '@') {srh++; if (srh >= svrOnlineS.length) {break;}}
if (svrOnlineS[srh] != undefined) { DebugPrint('transferring to available aux-server');
svrLinkS = svrLink.split('/'); svrG = new RegExp(svr, "g"); svr = 'http://'+svrOnlineS[srh].replace('@', '');
for (c=1; c -1) { // -1) { // -1) { // -1) { // -1) { // 伺服網站斷線! 照片、音樂、遊戲等外連檔案全部暫停服務....。', 'sad', 0);}
DebugPrint('no backup server available'); setTimeout('chkSvr()', 30000);
}
} else {svrChecked = true;} svrChecking = false;
}
function svrLoad(img) {
if (img.title.substr(0,1) != '@') {svrOnline += '/' + img.title;}
DebugPrint(img.title + ' online.');
if (img.title.indexOf(olSvr.substr(7)) > 0) {
olSvrOL = true;
if (kosOLok) {kosOL.style.display = 'block'; setTimeout("refreshOnlineMonitor()", 47);}
}
}
function shost(orgurl) {
if (orgurl.indexOf(' -1) {orgurl = orgurl.replace(' -1) {orgurl = orgurl.replace(' -1) {orgurl = orgurl.replace(' -1) {orgurl = orgurl.replace(' -1) {orgurl = orgurl.replace('/g, '');
document.write(orgurl.replace(/@@@@/g, svr));
}
function getSvrLinkId(pf) {
if (svrChecked == false && svrChecking == false) {probeSvr();}
svrLinkCount++; idEntry = pf + svrLinkCount; svrLink += '/' + idEntry; return idEntry;
}
function appendAction(newAction) {
if (kosOLok) {
rIdx0 = kosOnline.src.indexOf('&title='); oldAction = unescape(kosOnline.src.substring(rIdx0+7));
rIdx1 = oldAction.indexOf(' ~ '); if (rIdx1 > 0) {oldAction = oldAction.substring(0, rIdx1);}
if (newAction.length > 0) {
kosOnline.src = kosOnline.src.substring(0, rIdx0+7) + escape(oldAction + ' ~ ' + newAction);
} else {
kosOnline.src = kosOnline.src.substring(0, rIdx0+7) + escape(oldAction);
}
}
}
function updateSynctime(src, st) {
if (st.length == 0) {st = 'synctime';}
srcIdx1 = src.indexOf(st+'=');
if (srcIdx1 > 0) {
srcIdx2 = src.indexOf('&', srcIdx1);
if (srcIdx2 > 0) { // ...synctime=123&...
src = src.substr(0, srcIdx1) + st+'=' + nowTimeSerial() + src.substr(srcIdx2);
} else { // ...synctime=123
src = src.substr(0, srcIdx1) + st+'=' + nowTimeSerial();
}
} else { // ...xx.htm
if (src.indexOf('?') > 0) {
src += '&'+st+'=' + nowTimeSerial();
} else {
src += '?'+st+'=' + nowTimeSerial();
}
}
return src;
}
function nowDateTime() {dd = new Date(); return dd.getFullYear() +'/'+ (dd.getMonth()+1) +'/'+ dd.getDate() +' '+ dd.getHours() +':'+ dd.getMinutes() +':'+ dd.getSeconds();}
function nowTimeSerial() {dd = new Date(); return dd.getTime();}
function docTitle() {
title = document.title.substr(0, document.title.lastIndexOf(':: PIXNET 痞客邦 ::'));
title = document.title.substr(0, document.title.lastIndexOf(' @ '));
if (title == '') {
if (location.href.indexOf('/listall/') > 0) {
title = '[網誌] 文章彙整';
} else if (location.href.indexOf('/category/') > 0) {
title = '[網誌] 文章分類';
} else {
title = '[網誌] 首頁';
}
}
return title;
} //document.getElementById('docTitle').innerHTML = docTitle() + '
';
function artID() { // return '' at homepage
aID = location.href.substr(location.href.indexOf('/post/') + 6);
for (a=0; a '9') {aID = aID.substr(0, a); break;}}
return aID;
}
function getAId() { // return 'blog' at homepage
aidx = location.href.lastIndexOf('/');
aid = location.href.substr(aidx + 1);
aidx = aid.indexOf('#'); if (aidx > 0) {aid = aid.substr(0, aidx)};
return aid;
}
function wdWidth() {
if (typeof(window.innerWidth) == 'number') {
return window.innerWidth;
} else if (document.documentElement && document.documentElement.clientWidth) {
return document.documentElement.clientWidth;
} else if (document.body && document.body.clientWidth) {
return document.body.clientWidth;
} else {return 0;}
}
function wdHeight() {
if (typeof(window.innerHeight) == 'number') {
return window.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
return document.documentElement.clientHeight;
} else if (document.body && document.body.clientHeight) {
return document.body.clientHeight;
} else {return 0;}
}
function wdScrlLeft() {
if (typeof(window.pageXOffset) == 'number') {
return window.pageXOffset;
} else if (document.body && document.body.scrollLeft) {
return document.body.scrollLeft;
} else if (document.documentElement && document.documentElement.scrollLeft) {
return document.documentElement.scrollLeft;
} else {return 0;}
}
function wdScrlTop() {
if (typeof(window.pageYOffset) == 'number') {
return window.pageYOffset;
} else if (document.body && document.body.scrollTop) {
return document.body.scrollTop;
} else if (document.documentElement && document.documentElement.scrollTop) {
return document.documentElement.scrollTop;
} else {return 0;}
}
function remark(str, ignoreTab1, ignoreTab2) {
trd(ignoreTab1, 't ', '');
document.write('' + str + '');
trd(ignoreTab2, 't ', '');
}
function updateLog(dt, init) {
document.write('' + dt + ' ');
if (init.indexOf('i') >= 0) {
document.write('initiated');
} else if (init.indexOf('u') >= 0) {
document.write('updated');
}
if (init.indexOf('c') >= 0) {document.write('
');}
}
function appendJS(jsf) {
var script = document.createElement('script'); script.language = "JavaScript"; script.type = "text/javascript";
script.src = jsf; document.getElementsByTagName('head')[0].appendChild(script);
}
function itfOK() {return wdHeight() > 0;} //-->