Protect Images From Being Stolen Using Hotlink Blocker

Category: Image , Javascript | February 27, 2020
AuthorMadalinGrama
Last UpdateFebruary 27, 2020
LicenseMIT
Views142 views
Protect Images From Being Stolen Using Hotlink Blocker

The Hotlink Blocker protects your images from being stolen using vanilla JavaScript.

How It Works:

  • Replace the original image source with a custom URL (defaults to wikipedia copyright url).
  • Bind the Hotlink Blocker to the contextmenu event.
  • Refresh the current page after right click.

How to use it:

Download and load the main script index.js from the lib folder and the library will take care of the rest.

<script src="lib/index.js"></script>

You Might Be Interested In:


Leave a Reply