첨부파일(첨부이미지) 클릭시 프론트에서 팝업 방지하기

그누순정 기준으로 view.skin.php 의 적당 부분에

 

[code]

<script>
document.addEventListener("DOMContentLoaded", () => {
    bo_v_img.innerHTML = bo_v_img.innerHTML.replace(/<(\/a|a)([^>]*)>/gi, "");
} );
</script>

[/code]

|

댓글 5개

@arari 감사합니다
감사합니다.

적용해보니
첨부파일은 잘되요^^

에디터에서 올리는 이미지들은 안되는데 에디터로 올리는 것도 할 수 있을까요?
@끝없는사랑
이건 제가 예전에 풀었던 팁인데요...

[code]
<script>
bo_v_con.innerHTML = bo_v_con.innerHTML.replace(/<(\/a|a)([^>]*)>/gi, "");
function autoLink() {
for (beforeLink of arguments[0].getElementsByTagName("a")) beforeLink.innerHTML = beforeLink.innerHTML.replaceAll('htt', 'htt*');
keepProtocol = arguments[0].innerHTML.replaceAll('href="htt', 'href="htt*').replaceAll('src="htt', 'src="htt*').replaceAll('title="htt', 'title="htt*').replaceAll('background="htt', 'background="htt*').replaceAll('url(htt', 'url(htt*').replaceAll("url('htt", "url('htt*").replaceAll('alt="htt', 'alt="htt*');
arguments[0].innerHTML = keepProtocol.replace(new RegExp("(http|https)://([-/.a-zA-Z0-9_~#%$?&=:200-377()]+)", "gi"), "<a href='$1://$2' target='_blank'>$1://$2</a>").replaceAll('href="htt*', 'href="htt').replaceAll('src="htt*', 'src="htt').replaceAll('title="htt*', 'title="htt').replaceAll('background="htt*', 'background="htt').replaceAll('url(htt*', 'url(htt').replaceAll("url('htt*", "url('htt").replaceAll('alt="htt*', 'alt="htt');
for (afterLink of arguments[0].getElementsByTagName("a")) afterLink.innerHTML = afterLink.innerHTML.replaceAll('htt*', 'htt');
}
autoLink(bo_v_con);
</script>
[/code]
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

+
제목 글쓴이 날짜 조회
3년 전 조회 2,631
3년 전 조회 2,132
3년 전 조회 2,797
3년 전 조회 2,561
3년 전 조회 1,911
3년 전 조회 2,559
3년 전 조회 1,534
3년 전 조회 1,888
3년 전 조회 1,958
3년 전 조회 2,379
3년 전 조회 4,512
3년 전 조회 4,187
3년 전 조회 2,369
3년 전 조회 1,988
3년 전 조회 1,589
3년 전 조회 3,290
3년 전 조회 2,053
3년 전 조회 2,889
3년 전 조회 3,344
3년 전 조회 1,698
3년 전 조회 1,998
3년 전 조회 2,242
3년 전 조회 2,688
3년 전 조회 1,763
3년 전 조회 2,291
3년 전 조회 3,337
3년 전 조회 2,016
3년 전 조회 3,393
3년 전 조회 1,756
3년 전 조회 1,477