We are back with another tweak for bloggers blogging on Blogspot.com
Today I am thinking that many of us use watermark on our images so that its hard to anyone to copy our image in his work. But watermark can be removed.
Everyone can save our image just by right clicking on the image and then choosing "Save Image" option and what if we disable right click on images.
After applying this tweak whenever you right click on any image , you will get this message box like this:

How to Disable Right Click on Images in Your Blogspot Blog
 
Go through these steps to do so:

  1. Go to blogger.com and sign in to your account.
  2. Navigate to Template >> Edit HTML
  3. Search for </head>
  4. Right after </head>, paste the following code:
    <script type="text/javascript">
    //<![CDATA[
    /* ===========================================================
    Disable context menu on images by (Askaps.blogspot.com)
    ============================================================== */
        function nocontext(e) {
            var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
            if (clickedTag == "IMG") {
                alert(alertMsg);
                return false;
            }
        }
        var alertMsg = "Image context menu is disabled";
        document.oncontextmenu = nocontext;
    //]]>
    </script>
  5. Click on "Save Template" button and you have done. 
Bonus: You can change text in  red color in the above code to any of your desired text. This is the text displayed when anyone right clicks on an image,

254 comments:

«Oldest   ‹Older   1 – 200 of 254   Newer›   Newest»
«Oldest ‹Older   1 – 200 of 254   Newer› Newest»

Post a Comment