to protect page from copy



to protect page from copy 

 <style>

* {

  user-select: none;

  -webkit-user-select: none;

  -ms-user-select: none;

}

</style>



<!-- Bootstrap JS -->

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>


<script>

// Disable right click

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


// Disable copy, inspect etc.

document.onkeydown = function(e) {

    if (e.ctrlKey && (e.key === 'u' || e.key === 's' || e.key === 'c' || e.key === 'x')) {

        return false;

    }

    if (e.key === 'F12') {

        return false;

    }

};

</script>


No comments:

Post a Comment