Friday, 15 January 2021

Prevent copying in Blogger with popup warning

Prevent copying in Blogger with popup warning
January 15, 2021



Welcome again, a talk earlier about this plugin, how to protect your template from the Inspect element.

In this version, I will direct you to create a text warning window when users right-click on the page. Nice trick, isn't it? To get a better picture, watch the preview demo!
Explanation of the installation method
1. Log in to your blog
2. Appearance >> Edit HTML
3. Search for ]]> </ b: skin> and put the following code on top
ul.contextMenu {
 background: #fff;
 text-align: center;
 margin: 0;
 padding: 10px 20px;
 border-radius: 100px;
 color: #ff6460;
 box-shadow: 0 0 70px rgba(0, 0, 0, .25);
 font-family: "Roboto Condensed", sans-serif;
 font-weight: 700;
 font-size: 24px;
 z-index: 999999;
 position: fixed;
 top: 50%!important;
 left: 50%!important;
 transform: translate(-50%, -50%);
 pointer-events: none
}
4. Add this code above </body>
<ul class='contextMenu' hidden='1'>STOP 💣</ul>
<script type='text/javascript'>
// Right click miusm-tech
$(document).bind(&quot;contextmenu&quot;, function(event) {
event.preventDefault();
$(&quot;ul.contextMenu&quot;)
.show(); 
});
$(document).click(function() {
isHovered = $(&quot;ul.contextMenu&quot;).is(&quot;:hover&quot;);
if (isHovered == false){
$(&quot;ul.contextMenu&quot;).fadeOut(100);
}
});
</script> 
* You can add any message instead of STOP 💣
Share This :
SUBSCRIBE TO OUR NEWSLETTER

No comments: