Pencarian

Selasa, 08 April 2025

Anti Inspect Element

Agar website tidak bisa di inspect element berikut caranya.

<script>

        // Deteksi jika DevTools dibuka

        function checkDevTools() {

            const threshold = 160; // Perbedaan lebar/jendela saat DevTools dibuka

            if (window.outerWidth - window.innerWidth > threshold || 

                window.outerHeight - window.innerHeight > threshold) {

                document.body.innerHTML = `

                    <h1>NGAPAIN SIH TOLL!</h1>

                    <img src="https://nontonanimeyuk.com/napatol.jpg" alt="Gambar" style="display: block; margin: 20px auto;">

                `;

            }

        }


        // Nonaktifkan klik kanan

        document.addEventListener('contextmenu', function(e) {

            e.preventDefault();

        });


        // Nonaktifkan Ctrl+U dan F12

        document.onkeydown = function(e) {

            if (e.ctrlKey && (e.keyCode === 85 || e.keyCode === 123)) { // Ctrl+U atau F12

                return false;

            }

        };


        // Cek terus-menerus

        setInterval(checkDevTools, 1000);

    </script>

© 2015 [BUG] GEDEBUG All Rights Reserved.