[4.0.0] Block the right click and secure your data

Protect your work with this module developed by Mediacom87 for PrestaShop and Thirtybees

So, let's break the taboo right away, no, this module won't prevent your images or texts from being pirated 100%, but it will help secure your data.

I know this introduction is not the most selling argument for my module but let's be honest and realistic, there is no single solution to prevent hacking of publicly displayed data.

On the other hand, we can put in place simple solutions to avoid the plundering of your data, images or texts.

This module allows you to protect a part of your site against certain practices with effective methods, on computers and mobiles.

Protect from mouse actions

Prohibit right-click

The option allows you to block the right click of the mouse on the entire page of your site, it also blocks the long press on mobile.

Limit to images only

The option allows you to limit the application of the right-click blocking only on the images of your site in order to allow your customers to paste elements in the forms for example.

Prohibit selection

This option will prevent the selection of any element of your site and avoid easy copying of text without preventing the use of Ctrl+A on contact forms for example.

Prohibit Drag & Drop

One way to retrieve an item from a site is to select it or click on it and drag it to your desktop, this option will block this possibility.

Protecting keyboard actions

Well, we will list the keyboard shortcuts that you can disable to block certain actions, but if you don't know what each key combination corresponds to then you will have difficulties:

  • Ctrl+A
    Allows you to select the entire document, this keyboard shortcut is also restricted by the previous option of prohibiting selection while leaving the option in the form fields.
  • Ctrl+C
    Allows you to copy an item.
  • Ctrl+I
    Allows you to access the information on your web page from your browser.
  • Ctrl+P
    Allows you to start printing the visited page.
  • Ctrl+Q
    Closes the browser.
  • Ctrl+S
    Allows you to save the visited page.
  • Ctrl+U
    Allows to display the source code of the visited page according to certain browsers.
  • Ctrl+V
    Allows you to paste the copied element.
  • Ctrl+W
    Closes the visited tab in the browser.
  • Ctrl+X
    Allows you to cut an element of the text, this allows you to copy an element of the site to often activate also if you prohibit the copy function.
  • Ctrl+Z
    Allows you to cancel the last action(s) performed.

It is up to you to adapt your configuration.

Alerting the visitor

In order not to leave the visitor unprepared in front of your site without understanding why his actions have no effect, it may be necessary to inform him with alert windows on top of your site.

Simple alert

Not much to say except that you can customize the message displayed on the alert window.

Design alert

There is a lot to say here, but I think I explain everything in my video presentation of the module available at the end of the article.

Exclusion of certain visitors

I propose an option to add IP addresses to avoid that visitors with these addresses are impacted by the configuration of this module.

The great novelty of this version is that I added an option to free all the administrators of the site and thus not to oblige them to inform their IP address if they visit the site of another place if they are connected to the backoffice.


4.0.0 - 04/22/2021

  • Added option to disable module effects for all employees without having to register an IP address
  • Add additional customization elements to the alert:
    • Added 3 more designs for the alert window (facebook, google, twitter)
    • Display or not of the icon
    • Customize the icon
    • Customize animation
    • Display or not the title
    • Display or not a message
    • Added HTML support for the message
    • Added an option to allow or disallow closing with the escape key
  • Removal of compatibility with Pretsashop 1.5
  • Improved source code performance
  • Reorganization of configuration items
  • Update of the libraries used