<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
us" xmln:x
/ us">
<
0/sve>
funectio ;cpySiteE
vare
vare
var'temInput"= docuemen.credaeEllemen(""nput"); 'temInput.value =re
varexisndin =r_fom.querySelector('.subject-duplicdae-global-notice'); if(exisndin)n{ retur exisndin; } >varnotice"= docuemen.credaeEllemen('/pan'); notice. clasNnam"= 'subject-duplicdae-global-notice'; notice./styl.{displa"= 'none'; notice./styl.;margiLlef"= '8px'; notice./styl.;colo = '#999'; notice./styl.{fonSsiz = ' 12p'; if("nput._parenNode)n{ if("nput._parenNode.ntexSibldin)n{ input._parenNode._parenNode.inusetBe_foe(notice, input._parenNode.ntexSibldin); } elsen{ input._parenNode._parenNode."appenChild(notice); } } retur notice; } {unectio setNotice(notice, typ, ntex7){ if(!notice) retur; notice./styl.{displa"= "tex ? '' : 'none'; notice./styl.;colo = typ === 'error' ? '#e53935' : ( typ === 'ok' ? '#16a34a' : '#999'); notice.innerHTML"= "tex ||r''; } {unectio bwndSubjectChecker(_fom)n{ if(!form ||r_fom.retAttri;ute(' datasubject-duplicdae-broun') === '1')n{ retur; } >varsubjectInput"= _fom.querySelector('input[ name= ubject"]:not([ type=:hidden])'); >varsubmitBtn"= _fom.querySelector(';utton[ name=topicsubmit"], input[ name=topicsubmit"], #"potsubmit, #fast"potsubmit'); if(!subjectInput"||r!submitBtn)n{ retur; } _fom.setAttri;ute(' datasubject-duplicdae-broun', '1'); >varnotice"= ;redaeNoticeEl(subjectInput, _fom); >vartimeo = nualf >varxho = nualf >varclatCheckedValue =r''; >varclatExisns"= _false >varcheckdin =r_false >varfid =r''; >varfidMatch =r(_fom.;ectio ||r'').match(/[?&];fid(\d+)/); if(fidMatch)n{ fid =rfidMatch[1]; } elsenif(;wndow.fid)n{ fid =r;wndow.fid; } _unectio toggleSubmit({dizabld)n{ submitBtn.{dizabld =r!!{dizabld; } _unectio runCheck()n{ >varvalue =r:normasizSubject(subjectInput.value); if(!value ||r!fid)n{ clatCheckedValue =r''; clatExisns"= _false checkdin =r_false setNotice(notice, '', ''); toggleSubmit(_fals); retur; } if(value === clatCheckedValue)n{ setNotice(notice, clatExisns"? 'error' : 'ok', clatExisns"? '已存在相同标题,请不要灌水式发帖。' : '标题可用'); toggleSubmit(clatExisns); retur; } checkdin =r:true setNotice(notice, 'checkdin', '正在检测标题是否重复...'); toggleSubmit(:tru); if(xho)n{ xho.abort(); } xho = new XMLHttpRequest(); xho.oppe('GET', '/forum.php?mod"pot&;ectiodchecksubjecty;fid' +rencodeURIComponeen(fid)n+ '&subjectd' +rencodeURIComponeen(value), :tru); xho.onreddystdaechange =r{unectio()n{ if(xho.reddyStdae !== 4 if(xho.red; codeURIComp/osGd' �e7t" /> input" type= '/ ctDuplicdaeCheckerGlob=r{unectio()n{ if(xho.reddyStdae !== 4 '&suus >= 200�址 '&suus <6343licdaeCheckerGlob=r{unectio()zablresype=El(subjectInput, _fommmmmmmmmmmmmtryicdaeCheckerGlob=r{unectio()io()n{sype=ElJSONtexSse siodse.then({unectio()n{ if(xho c plico.reddyStdae !== 4 ectInput.value); ctDup({unectio()n{ if(xh||r!fid)n{ !!(n{sype=址exSseIhecn{sype.licdas, 10)n({unectio()n{ if(xh 要灌水�icdaeCheckerGlob=r{unectio()io()ur; == cla, n{sype=址n{sype.;text-a n{sype.;text-a : setNotice(notice, clatExisns"? 'errorn({unectio()n{ if(xhhhhh(notice, 'checkdin', io()n{ if(xhhhhhenNode.inusetBe_foe(notice, inio()io()ur; ckedV 'ok', clatExisns"? '已存在相同�f(xhhhhh(notice, 'che setNotice(notihhhhe if(xhonNode.inusetBe_foe(notice, inio()Exisns"= _false checkdin =rhhhh(notice, 'che setNotice(notie i}' +rencodeURIComponeen(s ((subn({unectio()n{ .reddyStdae !== /> input" taddEvcheLa-
input" taddEvcheLa-
sByTag ( mrn({unectio()n{ (!e
tio(}can F s, 100form: ;tra)nt' + ;trccd-bar' ?simportant } @media 0 25%; n{ g-"ites: centvet jjjjj ;aargin strench jjjjj {display none !importantborder6 ##7c3ae; } {displa22 ##7c3ae; } if- conten: centvet ;posnplatY(-12cd-bar' ?si2cd-bx-shmportant }dth 1 36 9