mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 08:41:39 +09:00
하이퍼링크 href값이 javascript나 mailto로 시작될 경우 target=_blank 속성을 추가하지 않게 수정
This commit is contained in:
parent
84fcdb8cfd
commit
a549513808
1 changed files with 8 additions and 3 deletions
|
|
@ -92,10 +92,15 @@
|
|||
});
|
||||
|
||||
xe.registerPlugin(new AutoLink());
|
||||
|
||||
|
||||
$(document).on('click', '.xe_content a', function() {
|
||||
if (!$(this).attr("target")) {
|
||||
$(this).attr("target", "_blank");
|
||||
var $this = $(this);
|
||||
var href = $this.attr('href');
|
||||
if(!href || /^(?:javascript|mailto):/.test(href)) {
|
||||
return;
|
||||
}
|
||||
if (!$this.attr("target")) {
|
||||
$this.attr("target", "_blank");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue