
1. 그누순정 basic / gallery 5.5 버전 이상의 "짧은 주소"에만 해당하며 나머지 조건에서는는 테스트해 보지도 않았고 테스트해 볼 생각 자체도 없으니 감안해서 사용하세요.
----------
2. 폰트어썸에서 깃발을 사용하였는데 바꾸고 싶다면 https://fontawesome.com/v4/icons/ 에서 재주껏 바꾸시기 바랍니다.
----------
3. view.skin.php 의 가장 하단이나 또는 view.tail.skin.php 에 아래의 코드를 입력합니다.
[ pc ]
[code]
<script>
document.write("<textarea id='copyUrl' style='display:none'></textarea>");
document.querySelector("#bo_v_top ul").insertAdjacentHTML("afterbegin", "<li><span id='urlSpan' class='btn_b01 btn' style='cursor:pointer' title='주소복사'><i class='fa fa-flag' aria-hidden='true'></i></span></li>");
function urlCopy() {
document.querySelector("#copyUrl").style.display = "block";
document.querySelector("#copyUrl").value = arguments[0];
document.querySelector("#copyUrl").select();
document.execCommand("copy");
document.querySelector("#copyUrl").style.display = "none";
alert("주소가 복사되었습니다");
}
document.querySelector("#urlSpan").onclick = () => {
urlCopy(String(location.href).split("?")[0]);
}
for (i of document.querySelectorAll("#bo_vc article .cm_wrap")) {
i.insertAdjacentHTML("afterbegin", "<span class='btn_b01 btn' style='position:relative;z-index:" + (Number(i.querySelector("header").style.zIndex) + 1) + ";float:right;cursor:pointer' title='주소복사'><i class='fa fa-flag' aria-hidden='true'></i></span>");
i.querySelector("span").onclick = function() {
urlCopy(String(location.href).split("?")[0] + "?#" + this.parentElement.parentElement.id);
}
}
</script>
[/code]
----------
[ 모바일 ]
[code]
<script>
document.write("<textarea id='copyUrl' style='display:none'></textarea>");
document.querySelector("#container ul").insertAdjacentHTML("afterbegin", "<li><span id='urlSpan' class='btn_b03 btn' style='cursor:pointer' title='주소복사'><i class='fa fa-flag' aria-hidden='true'></i></span></li>");
function urlCopy() {
document.querySelector("#copyUrl").style.display = "block";
document.querySelector("#copyUrl").value = arguments[0];
document.querySelector("#copyUrl").select();
document.execCommand("copy");
document.querySelector("#copyUrl").style.display = "none";
alert("주소가 복사되었습니다");
}
document.querySelector("#urlSpan").onclick = () => {
urlCopy(String(location.href).split("?")[0]);
}
for (i of document.querySelectorAll("#bo_vc article .comment_inner")) {
i.insertAdjacentHTML("afterbegin", "<span class='btn_cm_opt btn_b03 btn' style='position:relative;z-index:1;float:right;margin-top:-5px;margin-right:20px;cursor:pointer' title='주소복사'><i class='fa fa-flag' aria-hidden='true'></i></span>");
i.querySelector("span").onclick = function() {
urlCopy(String(location.href).split("?")[0] + "?#" + this.parentElement.parentElement.id);
}
}
</script>
[/code]
게시글 목록
| 번호 | 제목 |
|---|---|
| 21816 | |
| 21804 | |
| 21803 | |
| 21802 | |
| 21801 | |
| 21791 | |
| 21773 | |
| 21768 | |
| 21758 | |
| 21753 | |
| 21750 | |
| 21729 | |
| 21712 | |
| 21686 | |
| 21682 | |
| 21675 | |
| 21671 | |
| 21669 | |
| 21657 | |
| 21637 | |
| 21633 | |
| 21631 | |
| 21623 | |
| 21594 | |
| 21592 | |
| 21589 | |
| 21580 | |
| 21567 | |
| 21565 | |
| 21542 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기