Free mobile recharge for 10 lucky winners participate in this giveaway
HackingUniversity - Hacks . Tricks . How-To's

17 December 2012

How to Disable Right Click in Blogger without JavaScript

blogger-logoWell earlier we posted on how you can disable right click on your blogger blog by simply pasting out some JavaScript codes in your <body> section and your readers will not be able to right click but JavaScript tricks always have some issues like not working or maybe the other person has disabled the JavaScript so the thing will not work + you even have the addon to enable right click in firefox.

So with this easy trick we will not use any big JavaScript code to disable the right click but we will simply add a simple context menu disabling HTML line in your blog’s <body> section that will automatically prevent user from right clicking on your blog.

Now this code’s positive things are that it does not take any extra time to load + its small and easy to be installed and cracking this code is little bit difficult.

  1. Go to Blogger > Template > Edit HTML.
  2. Press Ctrl + F and search for <body> or <body expr:class='&quot;loading&quot; + data:blog.mobileClass'>
  3. Now if you have <body> tag just replace it with the below line.

    <body oncontextmenu='return false;'>

  4. Or if you have <body expr:class='&quot;loading&quot; + data:blog.mobileClass'> replace it with below line.

    <body expr:class='&quot;loading&quot; + data:blog.mobileClass' oncontextmenu='return false;'>

  5. Now just save your template and refresh your blog to see if this stuff is working or not, now you will not be able to right click on your blogger blog.