0 && t[r]!=undefined){
var bq = t[r].getElementsByTagName('div');
if(bq.length>0)
t[r].removeChild(bq[0]);
var bp = t[r].getElementsByTagName('i');
if(bp.length>0)
t[r].removeChild(bp[0]);
text = t[r].innerText;
}
else{
var bi = t[0].getElementsByTagName('i');
if(bi.length>0)
t[0].removeChild(bi[0]);
text = t[0].innerText;
}
if((undefined==text) || (text==' '))
text += "{:6_357:}{:6_357:} ";
else if((text.length>0) && (text.length<15)){
if(Math.random() > 0.7)
text += emotion[Math.floor(Math.random()*emotion.length)];
text += ' ';
}
else if(text.length>50)
text = text.substr(0, 20);
document.getElementById('vmessage_'+tidd).value = text;
document.getElementById('vreplysubmit_'+tidd).click();
GM_setValue(tidd, 1);
previewThread(tidd, tid, null);
ralert(tid, text);
setTimeout(startAutoReply, (reply_duration+Math.ceil(Math.random()*15))*1000);
}
}
}
xhr.send(null);
break;
return;
}
}
if(i >= tbl.length)
window.location.reload();
}
function ralert(tid, text){
if(!$('replyalert')){
var a = document.createElement('div');
a.id = 'replyalert';
document.getElementsByTagName('body')[0].appendChild(a);
GM_addStyle("#replyalert{top:0; right:0;position:fixed;width:180px; height:600px;overflow-y:auto;border:1px solid grey; background:rgba(130,255,0, 0.9);z-index:999;}");
GM_addStyle(".replylist{width:100%; border-bottom:1px solid black;}");
}
var l=document.createElement('div');
l.setAttribute('class', 'replylist');
$('replyalert').appendChild(l);
var t = $(tid);
var ttt = t.getElementsByTagName('th')[0].getElementsByTagName('a')[3].innerText;
console.log(ttt + " "+text);
l.innerHTML += ''+new Date().toLocaleTimeString()+'
' + ttt + '' + text;
}
(function startReply(){
var iff = document.getElementsByTagName('iframe')[0];
if(iff)
document.getElementById('ct').getElementsByClassName('mn')[0].removeChild(iff);
// Database error, 502等
var tb = document.getElementById('threadlisttableid');
if(typeof tb != 'object')
window.location.reload();
unsafeWindow.appendscript(unsafeWindow.JSPATH + 'forum_viewthread.js?' + unsafeWindow.VERHASH);
setTimeout(startAutoReply, reply_duration*1000);
//var replyInterval = setInterval(startAutoReply, reply_duration*1000 + Math.floor(Math.random()*15));
})()