구글 블로그 우클릭 드래그 방지 (Disable Right Click and Drag on Google Blogger)
구글 블로그를 운영하면서 마우스 우클릭 또는 드래그를 방지하는 기능이 필요한 경우가 생깁니다. 이 경우 각각 코드를 삽입하여 두 기능을 활성화 시킬 수 있습니다.
마우스 우클릭 방지 (Disable Right Click)
- 대쉬보드 (Dashboard) – 템플릿 (Template) – HTML편집으로 이동합니다.
- 찾기 기능으로 (Ctrl+F) </body> 를 찾은 후, 아래 코드를 바로 윗부분에 붙여넣습니다.
- Download Source Code : Download!!
<script language=javascript> <!-- var message=""; function clickIE() { if (document.all) { (message);return false;} } function clickNS(e) { if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {(message);return false;}} } if (document.layers){ document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{ document.onmouseup=clickNS;document.oncontextmenu=clickIE;} document.oncontextmenu=new Function("return false") // --> </script>
- 다른 방법으로는 CSS 구문에 아래 소스코드를 추가하면 됩니다.
/* Disable Right Mouse Click */ html, body, div, span, object, form, input, h1, h2, button, label, a, img { -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; /* this will work for QtWebKit in future */ -webkit-user-drag: none; }
긁어오기(드래그) 방지 (Disable Drag)
- 대쉬보드 (Dashboard) – 템플릿 (Template) – 맞춤설정 -> 고급으로 이동합니다.
- 고급 메뉴 중 ‘CSS추가’에서 아래 코드를 삽입하면 됩니다.
- Download Source Code : Download!!
html, body, div, span, object, form, input, h1, h2, button, label, a, img { -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; /* this will work for QtWebKit in future */ -webkit-user-drag: none; } input[type=text] { -moz-user-select: text; -webkit-user-select: text; }
- 다른 방법으로는 CSS 구문에 아래 소스코드를 추가하면 됩니다.
/* Disable Mouse Drag */ input[type=text] { -moz-user-select: text; -webkit-user-select: text; }
업데이트 글 보기 (For more information, visit main hompage) : http://gturl.iptime.org