웹마스터 팁
게시판 링크 무조건 새창으로 뜨게 하기
2009.08.29 23:24
오토링크 애드온을 허락도 없이 조금 수정해 봤습니다.
if($.inArray(pN, ['pre', 'xml', 'textarea', 'input', 'select', 'option', 'code', 'script', 'style']) != -1) continue;
if(obj.nodeType == 3 && obj.length >= 10) {
var content = obj.nodeValue;
if(!/(http|https|ftp|news|telnet|irc):\/\//i.test(content)) continue;
content = content.replace(/</g, '<');
content = content.replace(/>/g, '>');
content = content.replace(url_regx, '<a href="$1" target="_blank">$1</a>');
$(obj).replaceWith(content);
delete(content);
} else if(obj.nodeType == 1 && obj.childNodes.length) {
replaceHrefLink(obj);
}
}
}
$('.xe_content').each(function() {
replaceHrefLink(this);
});
});
xe설치폴더/addons/autolink/autolink.js 파일에서 빨간색으로 된 부분을 수정하면 됩니다.
오토링크 애드온을 활성화 시켜야 동작이 됩니다.
어떤 문제가 있을지 모르니 백업은 필수입니다.