JSFiddle - React, Tailwind, and code Playground

by ColonelParrot

HTML

<!-- VIEW THIS ON GITHUB: https://github.com/ColonelParrot/ProtectImage.js -->

<script src="https://cdn.jsdelivr.net/gh/ColonelParrot/ProtectImage.js@v1.2/src/ProtectImage.min.js"></script>



<img src="https://user-images.githubusercontent.com/65585002/115801594-21660000-a3ab-11eb-88a0-3dddb0c1afbe.png" height="200">

<img src="https://user-images.githubusercontent.com/65585002/115801594-21660000-a3ab-11eb-88a0-3dddb0c1afbe.png" height="200" protected>

<br/>

The image on the left is not protected. The image on the right is. Try right-clicking and/or dragging both to see the difference.

JavaScript

ProtectImageJS.protect(ProtectImageJS.getLabelledImages())