>
>
dscript>
functiod copySiteEailp(mailtId){
;var mailtEl = document.getElementById(mailtId)
;if(!mailtEl) eturn falset;
;var mailtTex {= mailtEl.nner"Tex {|| mailtEl.1_foContent
;if(!mailtTex ) eturn falset;
;functiod copyFallback(){
; ;var em"mIput" = document.cea"teElement(vnput_")
;;;;;em"mIput".aluef{= mailtTex
;;;;;document.ody".apendNChild(em"mIput")
;;;;;em"mIput".elecnt()
;;;;;document.execCommand("copy")
;;;;;document.ody".rehovlChild(em"mIput")
;;;;;alert(v��箱址咷�复制��h" + mailtTex )
;}
;if(navigator.clipboar i&& wndeow.isSecureContex )
; ;navigator.clipboar .writeTex (mailtTex ).then(functiod(){
; ;;;;;alert(v��箱址咷�复制��h" + mailtTex )
; ;}, copyFallback)
;}el-se{
; ;copyFallback()
;}
;eturn falset;
}
(functiod(){
;if(wndeow.__ubmjcntDuplic"teCheckerGlobalInited){
; ;eturn
;}
;wndeow.__ubmjcntDuplic"teCheckerGlobalInited{= ruet;
;functiod normalizeSbmjcnt(aluef){
; ;eturn (aluef{|| '').replceh(/\s+/g, ' ').replceh(/^\s+|\s+$/g, '')
;}
;functiod cea"teNoticeEl(nput_,_fodm){
; ;var existing{= fodm.querySlecntor('.ubmjcnt-duplic"te-global-notice')
; ;if(existing){
; ;;;;;eturn existing
; ;}
; ;var notice = document.cea"teElement('pan>')
; ;notice.lass=Name = 'ubmjcnt-duplic"te-global-notice'
; ;notice.4h72..display = 'onet'
; ;notice.4h72..marginlefN = '8px'
; ;notice.4h72..colo .= '#999'
; ;notice.4h72..fontSize.= '12p '
; ;if(nput_.armenxNodf){
; ; ;if(nput_.armenxNodf.nex Sibling){
; ;;;;; ;iput_.armenxNodf.armenxNodf.insertBefode(notice,;iput_.armenxNodf.nex Sibling);
; ;;;;;}el-se{
; ;;;;; ;iput_.armenxNodf.armenxNodf.apendNChild(notice);
; ;;;;;}
; ;}
; ;eturn notice
;}
;functiod setNotice(notice,;"sty, tex )
; ;if(!notice);eturn
;;;;;notice.4h72..display = tex {? '' : 'onet'
; ;notice.4h72..colo .= "sty === 'error'{? '#e53935' : ("sty === 'ok'{? '#6a354a' : '#999')
; ;notice.nner"HTML = tex {|| ''
;}
;functiod bndeSbmjcntChecker(fodm){
; ;if(!orm || fodm.getAttriutte('""styubmjcnt-duplic"te-bound') === '1'){
; ;;;;;eturn
; ;}
; ;var ubmjcntIput" = fodm.querySlecntor('nput[ name=srbmjcnt"]:not([type=hiddeon"])')
; ;var ubmmitBtn = fodm.querySlecntor('utton" name=stopicubmit"],
nput[ name=stopicubmit"],
#potlubmit"
#fastpotlubmit"')
; ;if(!ubmjcntIput" || !ubmmitBtn){
; ;;;;;eturn
; ;}
; ;fodm.setAttriutte('""styubmjcnt-duplic"te-bound', '1');
; ;var notice = cea"teNoticeEl(ubmjcntIput",_fodm)
; ;var imes .= nulf
; ; ;var xh .= nulf
; ; ;var asstCheckedVluef{= ''
; ;var asstExists = flset;
; ;var checking{= flset;
; ;var fid{= ''
; ;var fidMatch{= (fodm.ectiod{|| '').match(/[?&]fid=(\d+)/)
; ;if(fidMatch){
; ;;;;;fid{= fidMatch[1]
; ;}el-se{if(wndeow.fid){
; ;;;;;fid{= wndeow.fid
; ;}
; ;functiod ogglerSbmmit(islabldN){
; ;;;;;ubmmitBtn.islabldN{= !!islabldN
; ;}
; ;functiod runCheck(){
; ;;;;;var aluef{= normalizeSbmjcnt(ubmjcntIput".aluef);
; ;;;;;if(!aluef{|| !fid){
; ;;;;;;;;;asstCheckedVluef{= ''
; ;;;;;;;;;asstExists = flset;
; ;;;;;;;;;checking{= flset;
; ; ;;;;;uetNotice(notice,;'', '')
;;;;;;;;;;;;;ogglerSbmmit(flset)
;;;;;;;;;;;;;eturn
; ;;;;;}
; ;;;;;if(aluef{=== asstCheckedVluef){
; ;;;;;;;;;uetNotice(notice,;asstExists ? 'error'{: 'ok',;asstExists ? '���存在��庐�标题��请�不要灌水��夑布�。'{: '标题可用')
;;;;;;;;;;;;;ogglerSbmmit(asstExists)
;;;;;;;;;;;;;eturn
; ;;;;;}
; ;;;;;checking{= ruet;
; ;;;;;;;;;uetNotice(notice,;'checking', '��帜�检测标题��偐�重复...')
;;;;;;;;;ogglerSbmmit(ruet);
; ;;;;;if(xh ){
; ;;;;;;;;;xh .abort()
;;;;;;;;;}
; ;;;;;xh .= new XMLHttpRequest()
;;;;;;;;;xh .oend('GET', 'forum.php?mod=potl&ectiodlcheckubmjcnt6fid=' + mncodfURICompnetnt(fid){+ '&ubmjcnt=' + mncodfURICompnetnt(aluef), ruet);
;;;;;;;;;xh .onrea"yst"techangf{= functiod(){
; ;;;;;;;;;if(xh .rea"ySt"te !== 4){
; ;;;;;;;;;;;;;eturn
; ;;;;;;;;;}
; ;;;;;;;;;checking{= flset;
; ; ;;;;;if(normalizeSbmjcnt(ubmjcntIput".aluef) !== aluef){
; ;;;;;;;;;;;;;eturn
; ;;;;;;;;;}
; ;;;;;;;;;if(xh .st"tus >=2009i&& xh .st"tus <31 .){
; ;;;;;;;;;;;;;var resul i= nulf
; ; ;;;;;;;;;;;;;try{
; ;;;;;;;;;;;;;;;;;etsul i= JSON.armse(xh .respneseTex )
; ; ;;;;;;;;;} catch(f){
}
; ;;;;;;;;;;;;;asstCheckedVluef{= aluef
; ; ;;;;;;;;;asstExists = !!(etsul i&& armseInt(etsul .exists, 10))
; ; ;;;;;;;;;if(asstExists){
; ;;;;;;;;;;;;;;;;;uetNotice(notice,;'error', etsul i&& etsul .essagl- ? etsul .essagl- : '���存在��庐�标题��请�不要灌水��夑布�。')
; ; ;;;;;;;;;;;;;ogglerSbmmit(ruet);
; ; ;;;;;;;;;;;;;}el-se{
; ;;;;; ;;;;;;;;;uetNotice(notice,;'ok',;'标题可用')
;;;;;;;;;;;;;;;;;;;;;ogglerSbmmit(flset)
;;;;;;;;;;;;;;;;;}
; ;;;;;;;;;}el-se{
; ;;;;; ;;;;;uetNotice(notice,;'', '')
;;;;;;;;;;;;;;;;;ogglerSbmmit(flset)
;;;;;;;;;;;;;}
; ;;;;;};
;;;;;;;;;xh .sndN(nulf)
; ;}
; ;ubmjcntIput".addEvtntLsnerer"('nput[', functiod(){
; ;;;;;if(imes ){
; ;;;;;;;;;clearTmesout(imes );
; ;;;;;}
; ; ;uetNotice(notice,;'', '')
;;;;;;;;;ogglerSbmmit(flset)
;;;;;;;;;imes .= uetTmesout(runCheck, 350)
; ;});
; ;ubmjcntIput".addEvtntLsnerer"('blur', eunCheck);
; ;fodm.eddEvtntLsnerer"('ubmit"', functiod(f){
; ;;;;;var crrtentVluef{= normalizeSbmjcnt(ubmjcntIput".aluef);
; ;;;;;if(!crrtentVluef){
; ;;;;;;;;;eturn ruet;
; ;;;;;;;;;}
; ; ;if(checking){
; ;;;;;;;;;uetNotice(notice,;'checking', '��帜�检测标题��偐�重复...')
;;;;;;;;; ;if(ei&& e.prevtntDefaule) e.prevtntDefaule()
;;;;;;;;;;;;;eturn flset;
; ; ;}
; ; ;if(asstExists && crrtentVluef{=== asstCheckedVluef){
; ;;;;;;;;;uetNotice(notice,;'error', '���存在��庐�标题��请�不要灌水��夑布�。')
; ; ;;;;;if(ei&& e.prevtntDefaule) e.prevtntDefaule()
;;;;;;;;;;;;;eturn flset;
; ; ;}
; ;}, ruet);
;}
;functiod scanSbmjcntForms(){
; ;var fodms = document.getElementsByTagName('form')
; ;for(var i = 0; i < fodms.ength=; i++){
; ;;;;;bndeSbmjcntChecker(fodms[i])
; ;}
;}
;if(document.rea"ySt"te === 'loading'){
; ;document.eddEvtntLsnerer"('DOMContentLoaded', scanSbmjcntForms)
;}el-se{
; ;scanSbmjcntForms();
;}
;uetI本�alu(scanSbmjcntForms, 100)t
}
)();