Bản Convert
Đang tải nội dung chương...
try{ if(location.hash){ if(location.hash.match && location.hash.match(/settransmode=(name|chinese)/)){ settransmode(/settransmode=(name|chinese)/.exec(location.hash)[1], true); } if(location.hash.match && location.hash.match(/settranslang=(vi|en|.....)/)){ settranslang(/settranslang=(vi|en|.....)/.exec(location.hash)[1], true); } }}catch(ss){} var noscale=q('meta[name="viewport"]')[0]; noscale.setAttribute("content", "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"); var chapcache={}; var bookid="7076265055934745600"; var currentid="7120218603496210947"; var bookhost="fanqie"; if(bookhost=="sangtac"||bookhost=="dich"){ window.lockCtp = true; if(window.fontfam){ g("maincontent").style.fontFamily = window.fontfam; }else{ g("maincontent").style.fontFamily = 'nunito'; } } if(["faloo","dich","sangtac"].indexOf(bookhost)>=0){ addEventListener('DOMContentLoaded', (event) => { q("#configBox button")[0].style.display= "none"; }); } if(bookhost=="faloo"){ window.lockCtp = true; if(window.fontfam){ g("maincontent").style.fontFamily = window.fontfam; }else{ g("maincontent").style.fontFamily = 'stvarial'; } } var booksty=1; var currentidc=''; var chapterfetcher = new XMLHttpRequest(); var tmpctn = document.createElement("div"); var timerout = setTimeout(function(){ if(chapterfetcher.readyState==1){return;} if(bookhost!="qidian"){ g("maincontent").innerHTML="
Đang tải nội dung chương...
'; chapterfetcher.onreadystatechange = function() { if (chapterfetcher.readyState == 4 && chapterfetcher.status == 200) { var x = JSON.parse(chapterfetcher.responseText); if (x.code == "0") { chapcache[currentid]=x; g("breadcum").innerText = x.bookname + " / " + x.chaptername; g("booknameholder").innerHTML = x.bookname; g("bookchapnameholder").innerHTML = x.chaptername; // g("navprevtop").setAttribute("href", `/truyen/${x.bookhost}/1/${x.bookid}/${x.prev}/`); /// g("navnexttop").setAttribute("href", `/truyen/${x.bookhost}/1/${x.bookid}/${x.next}/`); //g("navprevbot").setAttribute("href", `/truyen/${x.bookhost}/1/${x.bookid}/${x.prev}/`); // g("navnextbot").setAttribute("href", `/truyen/${x.bookhost}/1/${x.bookid}/${x.next}/`); g("navcentertop").setAttribute("href", `/truyen/${x.bookhost}/1/${x.bookid}/`); g("navcenterbot").setAttribute("href", `/truyen/${x.bookhost}/1/${x.bookid}/`); document.title=x.chaptername+" - " +x.bookname +" - Sáng Tác Việt - sangtacviet.com"; //updateTusach(); if(window.moveitoupper){ tmpctn.innerHTML= preprocess(x.data); moveitoupper(tmpctn.innerHTML); }else{ g("maincontent").innerHTML = preprocess(x.data); } if(!window.contentcontainer){ window.contentcontainer = "maincontent"; } handleDefaultName(x.defaultname); if(bookhost=="sangtac"){ return; } applyNodeList(); if(x.next==0||x.next=="0"||x.prev==0||x.prev=="0"){ try{ setTimeout(function(){ updatenewlink(x.bookhost,x.bookid,currentid); },1500); }catch(xx){ } } } else { alert(x.err+"\n"+location.href); } }else { if (chapterfetcher.readyState == 4 && chapterfetcher.status-500 >= 0){ g(contentcontainer).innerHTML = '
'; } } } chapterfetcher.send("rescan=true&k="); } var loadednext=false; function loadNextChapter(host,id,chap){ if(loadednext||chap==0||chap=="0"){ return; } loadednext=true; ajax("sajax=readchapter&prefetch=true&bookid="+id+'&h='+host+'&c='+chap+'&sty=1',function(){}); } function decodeNumMask(e){var t="",n=e.split("-");for(var r=0;r
"); //str=str.replace(/\[img src=/g,"'; }); return str; } } if(["faloo", "dich", "sangtac"].indexOf(bookhost) > -1){ var c = st.create(".contentbox{word-break: keep-all !important;}").use(); } str=str.replace(/<\/p>\r\n
/g," /g,"
");
if(location.href.indexOf("ciweimao")>0){
str=str.replace(/.*?<\/span>/g,"");
str=str.replace(//g,"");
}
if(getCookie("foreignlang") && isFrn){
str=str.replace(/
/g,"
");
str=str.replace(/\n+/g,"
");
str=str.replace(/
(
)+/g,"
");
if(/
[^\<]{500,}/.test(str)){
str=str.replace(/
[^\<]{500,}/g,function(m){
return m.replace(/([\.!]+)/g, "$1
");
});
}
return str;
}
if(getCookie("transmode") && getCookie("transmode") == "tfms"){
str=str.replace(/
/g,"
");
str=str.replace(/\n+/g,"
");
str=str.replace(/
(
)+/g,"
");
return str;
}
if(getCookie("transmode") && getCookie("transmode") == "tfms2"){
str=str.replace(/\n/g,"
");
return str;
}
if(bookhost=="fanqie"){
str = str.replace(/<\/?article>/g,"");
str = str.replace(/_i_/g,"~");
}
str=str.replace(/đạo ?<\/i>:/g,"nói:");
str=str.replace(/ /g,"
");
str=str.replace(/\n/g,"
");
str=str.replace(/(\w) \./g,"$1.");
str=str.replace(/((\w\.{1}[ \t])|(\w[!?]+(”|】)?))/g,"$1
");
str=str.replace(/
/ig,"
");
str=str.replace(/(
(|\n|\t|\r| )*)+/g,"
");
str=str.replace(/([\w>])“/g,"$1 “");
str=str.replace(/(\w)<\/i>
“/g,"$1.
");
str=str.replace(/ ”/g,"”");
if(location.href.indexOf("uukanshu")>0){
str=str.replace(/
([\)” 】!?]+)(
|$)/g,"$1$2");
str=str.replace(/ ([,’]) /g,"$1 ");
str=str.replace(/ ‘ /g," ‘");
str=str.replace("/g,"
\n");
str=str.replace(/
\n([^“][^\n“]*?)”
/g,"
“$1”
");
str=str.replace(/
\n/g,"
");
}
str=str.replace(/<\/p>
");
str=str.replace(/ ([,\.!\?”]+)/g,"$1");
if(bookhost == 'fanqie'){
str = str.replace(/src=".*?"/g,function(m){return m.replace(/
/g,"");});
}
return str.replace("\ufffe","");
}
try {
analyzer.tocollect=["其他"];
//analyzer.lookforcollect();
} catch(e) {}