Right click disable for blogger site with code

 Right click disable for blogger site with code

This code will prevent the default behavior of the right-click event, which is to show the context menu with options such as "Save image as" or "Copy link address".

Note that this method may not be foolproof, as there are other ways for users to copy or download your content. Additionally, disabling the right-click function can also be inconvenient for users who use it for legitimate purposes, such as opening links in a new tab or accessing browser functions.


This code will prevent the default behavior of the right-click event, which is to show the context menu with options such as "Save image as" or "Copy link address".  Note that this method may not be foolproof, as there are other ways for users to copy or download your content. Additionally, disabling the right-click function can also be inconvenient for users who use it for legitimate purposes, such as opening links in a new tab or accessing browser functions.


*******1) disable1:- ]]></b:skin>

<style type='text/css'>

body{

display:block;-khtml-user-select:none;

-webkit-user-select:none;

-moz-user-select:none;

-ms-user-select:none;

-o-user-select:none;

user-select:none;

unselectable:on;

}

</style>


************2) disable2:- </body>

<script>

$(&#39;body&#39;).bind(&#39;copy cut drag drop&#39;, function (e) { e.preventDefault(); });

</script>


**************use this code for /?m=1 problem solution above closing body tag

<script type='text/javascript'>

//<![CDATA[

var uri = window.location.toString();

if (uri.indexOf("%3D","%3D") > 0) {

var clean_uri = uri.substring(0, uri.indexOf("%3D"));

window.history.replaceState({}, document.title, clean_uri);

}

var uri = window.location.toString();

if (uri.indexOf("%3D%3D","%3D%3D") > 0) {

var clean_uri = uri.substring(0, uri.indexOf("%3D%3D"));

window.history.replaceState({}, document.title, clean_uri);

}

var uri = window.location.toString();

if (uri.indexOf("&m=1","&m=1") > 0) {

var clean_uri = uri.substring(0, uri.indexOf("&m=1"));

window.history.replaceState({}, document.title, clean_uri);

}

var uri = window.location.toString();

if (uri.indexOf("?m=1","?m=1") > 0) {

var clean_uri = uri.substring(0, uri.indexOf("?m=1"));

window.history.replaceState({}, document.title, clean_uri);

}

//]]>

</script>

Post a Comment

0 Comments