2026, 새로운 도약을 시작합니다.

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

그누순정 기준으로 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년 전 조회 4,598
2741 3일 전 조회 120
2740 5일 전 조회 108
2739 1주 전 조회 210
2738 1주 전 조회 218
2737 1주 전 조회 181
2736 1주 전 조회 280
2735 3주 전 조회 284
2734 3주 전 조회 263
2733 1개월 전 조회 265
2732 1개월 전 조회 301
2731 1개월 전 조회 268
2730 1개월 전 조회 227
2729 1개월 전 조회 357
2728 1개월 전 조회 245
2727 1개월 전 조회 422
2726 1개월 전 조회 256
2725 1개월 전 조회 332
2724 1개월 전 조회 361
2723 1개월 전 조회 267
2722 1개월 전 조회 300
2721 1개월 전 조회 212
2720 2개월 전 조회 304
2719 2개월 전 조회 307
2718 2개월 전 조회 202
2717 2개월 전 조회 337
2716 2개월 전 조회 202
2715 2개월 전 조회 312
2714 2개월 전 조회 273
2713 2개월 전 조회 376
2712 2개월 전 조회 289
🐛 버그신고