Disable 'Right-Click' on Your liveBooks Website

By utilizing the Developer Tools in the liveBooks editor, you are able to disable the 'right-click' or 'context menu' for your images on the site. This is a helpful deterrent for piracy and image theft. 

To disable the ability for users to right-click on your site:

1. Copy the code below:

document.addEventListener('contextmenu', event => event.preventDefault());

2. Navigate to your liveBooks dashboard.

3. Navigate to your website's Developer Tools by clicking the [<>] icon on the grey navigation bar at the top of the page.

4. Click on Body JS; the link is located directly under the title Developer Tools.

5. You will see a text field. In the first available empty line (if you do not have any code here, it will be the first line in the text box), paste the code.

6. Click the blue Save button.

7. Click the green Publish button in the top-right corner of your site to publish the changes!

Screen_Shot_2020-04-21_at_11.07.40_AM.png

 

Didn’t find what you were looking for?

We'll help you find the answer or connect with an advisor.

Chat Phone
Powered by Zendesk