How to Disable CTRL+U , CTRL+C and Right Click on Blogger and Website - techtipsguidelines

TechTipsGuidelines

Post Top Ad

Thursday, July 26, 2018

How to Disable CTRL+U , CTRL+C and Right Click on Blogger and Website


How to disable CTRL+U , CTRL+C and Right Click on Blogger Wordpress and Website also Webpage.Many article on internet about disable right click , copy content etc.. but its a cool Tips to prevent People to stealing / Copying your content. but there are many other ways to copy content from a webpage even section of text os disable on your Blogger wordpress or website and webpage. so alternately you can use a stronger javascript code which not disable selection of text only, but also it would disable CTRL+U (can used to see actual HTML code , used to create a webpage), CTRL+C (can be ised to copy highlighted / selected text) and right mouse click (display list of options to do something with the otem such as view source, copy, paste etc.) on your blogger wordpress or website and webpage.


Let's move to the tutorial of disabling CTRL+U, CTRL+C key and Mouse Right Click on your Blogger wordpress and website and webpage


Go to Blogger or your website html code search </head> tag, just above it paste below javascript code.


<script type='text/javascript'>
var isCtrl = false;
document.onkeyup=function(e)
{
if(e.which == 17)
isCtrl=false;
}
document.onkeydown=function(e)
{
if(e.which == 17)
isCtrl=true;
if((e.which == 85) || (e.which == 67) &amp;&amp; isCtrl == true)
{
// alert(&#8216;Keyboard shortcuts are cool!&#8217;);
return false;
}
}
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
}
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
</script>


No comments:

Post a Comment

Post Top Ad

ADBLOCKER DETECTED
It looks like you're using an ad blocker. That's okay. Who doesn't?
But without advertising-income, we can't keep making this site awesome.
Please disable your ad blocker and then reload the page to continue enjoying our site.
Reload Page
Powered By - techtipsguidelines