Enable Right Click WordPress Site

I have inherited a website built by another developer that I’m attempting to do updates on. He somehow managed to disable right click on the site without using a plugin and I have no idea how he did it.

The website is https://tracywrightcorvo.com/

Read More

It’s on WordPress using the Salient theme.

I’m really hoping that one of you brilliant people can help me figure out how to re-enable right clicking on the site.

Thank you!!

Related posts

2 comments

  1. If you try to load the website with javascript disabled you will realise that the right click works.
    It is very common to disable right clicking with a little piece of code that mostly partially useless (you can disabled very easily as you saw) and it only annoys most of the users.

    Anyways if you look at your source code you will see this file:

    wp-content/plugins/nextgen-gallery-pro/modules/image_protection/static/custom.js
    

    With this JavaScript:

    (function($) {
        $(document).bind('contextmenu dragstart', function(event) {
            var target = event.target || event.srcElement;
            target = $(target);
            if (target.data('ngg-protect')             // image is directly 'protected'
            ||  target.parent('a').data('ngg-protect') // parent anchor is 'protected'
            ||  target.attr('id') == 'fancybox-img'    // Fancybox
            ||  target.attr('id') == 'TB_Image'        // Thickbox
            ||  target.attr('id') == 'shTopImg'        // Shutter, Shutter 2
            ||  target.attr('id') == 'lightbox-image'  // 'Lightbox'
            ||  target.hasClass('highslide-image')    // Highslide
            ||  target.parents('.ngg-albumoverview').length == 1
            ||  target.parents('.ngg-pro-album').length == 1
            ||  photocrati_image_protection_global.enabled == '1')
            {
                event.preventDefault();
            }
        });
    }(jQuery));
    

    Just remove it from functions.php look for wp_enqueue_script().

    #Edit 2:

    I also noticed the following:

    var photocrati_image_protection_global = {"enabled":"1"};
    

    With a little search about “photocrati”, I would advise you to check to :

    Theme Options -> Gallery Settings -> Right-Click Protection
    

    I hope any of the above will help you.

  2. Check the table wp_photocrati_gallery_settings column fs_rightclick, is it “ON” or “OFF”?

    If “ON”, change it to “OFF”.

Comments are closed.