Skip to main content
Asked a question 9 months ago

[Image Security] As a new member of the community and a artist/photographer, I'm needed more security features implements into posting images within the community. I found the other day that after posting an image in reference to a topic I created, anyone viewing this topic can right click on said image and copy the image. So I'm needed more security options to help protect images from being stolen. A couple of sites do this while most do not and allow images to be stolen with a simple right click and copy or save feature.

Where am I?

In Tribe you can ask and answer questions and share your experience with others!

Add this in the body tag through the theme setting.

<script type="text/javascript">
       document.querySelector('.searchbox [type="reset"]')
           .addEventListener('click', function () {
               this.parentNode.querySelector('input')
                   .focus();
           });
       
   </script>
   <script language="JavaScript">
       window.onload = function () {
           document.addEventListener("contextmenu", function (e) {
               e.preventDefault();
           }, false);
           document.addEventListener("keydown", function (e) {
               //document.onkeydown = function(e) {
               // "I" key
               if (e.ctrlKey && e.shiftKey && e.keyCode == 73) {
                   disabledEvent(e);
               }
               // "J" key
               if (e.ctrlKey && e.shiftKey && e.keyCode == 74) {
                   disabledEvent(e);
               }
               // "S" key + macOS
               if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
                   disabledEvent(e);
               }
               // "U" key
               if (e.ctrlKey && e.keyCode == 85) {
                   disabledEvent(e);
               }
               // "F12" key
               if (event.keyCode == 123) {
                   disabledEvent(e);
               }
           }, false);
           
           function disabledEvent(e) {
               if (e.stopPropagation) {
                   e.stopPropagation();
               } else if (window.event) {
                   window.event.cancelBubble = true;
               }
               e.preventDefault();
               return false;
           }
       };
       
   </script>