티스토리 뷰


티스토리에는 이 같은 마우스 오른쪽 클릭 방지 플러그인이 있긴 하지만

사실 일부 브라우저만 막을 뿐 실질적인 효과를 기대하기 어렵다.


HTML/CSS 편집을 통한 확실한 불펌 방지 방법을 소개하겠다.





먼저 위의 텍스트 파일을 다운로드 받는다.


그리고 관리자 모드 HTML/CSS 편집에서



skin.html 상단에 있는 <head>와 </head> 사이에 다운로드 받은 텍스트 파일


<script type="text/javascript">

var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){

if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)

return false

}

function reEnable(){

return true

}

if (typeof document.onselectstart!="undefined")

document.onselectstart=new Function ("return false")

else{

document.onmousedown=disableselect

document.onmouseup=reEnable

}

</script>


를 복사해 붙여 넣고,



</head> 밑에 있는 <body>를 다운로드 받은 텍스트 파일

<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">

로 바꾸어 주면 된다.


* 만약 <body>에 다른 코드가 입력되어 있다면 코드를 바꾸지 말고 그 밑에 따로 추가하면 된다.


댓글
공지사항
최근 글
최근 댓글