August 28, 2019

"Right-click" | How to protect context on Blogger


Photographers and lifestyle bloggers! Have you ever thought of how to protect you work on blogger from being duplicated and published elsewhere by readers? Lately I've been having doubts regarding my photography copyrights on my site whether someone seen them and just hit "right-click" and save it to their desktop. No, no, no - no more! Only by accident I found quite simple solution for this and I hope it will be useful for you as well. Let's fix it and I will show it to you now how to do it:


Step 1: Open your Blogger and go to "Theme", once you're in it you have to click on "Edit HTML"

Step 2: Hit "CTRL+F" to find <head> in the html code. On my template <head> is showing in row 9. Paste below code underneath it:
<script type="text/javascript">
//<![CDATA[
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>

Your code should look like this:



Step 3: All you need to do now is just "Save theme" and voilà !

Now whenever you or someone else try to right-click on any of your context it will show announcement that "Image context menu is disabled" but you can change text in the code to whatever you want.



Karolina Wolska

9 comments:

  1. actually, that's really helpful!

    ReplyDelete
  2. Zdecydowanie warto tak zrobić ☺

    ReplyDelete
  3. Świetny wpis, niestety, ja kompletnie nie znam się na htmlach i innych kodach, które dla blogera są bardzo pomocne. Zawsze korzystam z pomocy innych, z podpowiedzi, z samouczków. Nie wszystko zawsze mi wychodzi, ale nie poddaję się! :) Obecnie mam problem z dodaniem na bloga profilu instagrama ze zdjęciami, jakiego kodu bym nie użyła to mi nie działa :/
    Pozdrawiam ciepło ♡
    Ayuna

    ReplyDelete
    Replies
    1. Zaskocze Cie, bo ja tez sama nie ograniam codow html, ale musze przyznac ze ten trick nie zaszkodzil i jest bardzo prosty do zainstalowania :) Dobrze, ze probujesz - oby tak dalej!

      Delete
  4. Bardzo przydatny wpis :) Sama nie korzystam z Bloggera, ale osoby, które go używają, na pewno skorzystają ;)

    ReplyDelete
  5. Ja niestety nie jestem obeznana w tych HTML-ach i sama nie robię nic na moim blogu. Jak już to kogoś proszę o pomoc :)

    ReplyDelete

❤ I hope you like what you saw. Leave a comment below responding to relevant post and I will definitely reply back.
❤ I visit sites visiting mine - I will follow you if I like what I see.
❤ All photographs posted on this website are under my authorship - please don't copy them.