Question:

I need the css code that disables the right click function and shakes the screen..?

by Guest65488  |  earlier

0 LIKES UnLike

i need the one when you right click something, the screen shakes and then a messages like "no right click" pops out..

i don't need the website..

i need the code itself. :D

 Tags:

   Report

2 ANSWERS


  1. Im not sure about the shaking thing, but here's the code for no right click itself-

    <!-- Begin

    function right(e) {

    if (navigator.appName == 'Netscape' &&

    (e.which == 3 || e.which == 2))

    return false;

    else if (navigator.appName == 'Microsoft Internet Explorer' &&

    (event.button == 2 || event.button == 3)) {

    alert("Sorry, you do not have permission to right click.");

    return false;

    }

    return true;

    }

    document.onmousedown=right;

    document.onmouseup=right;

    if (document.layers) window.captureEvents(Event.MOUSEDOWN);

    if (document.layers) window.captureEvents(Event.MOUSEUP);

    window.onmousedown=right;

    window.onmouseup=right;

    //  End -->

    </script>

    </HEAD>

    put this at the header of your website, the very top part after it says <head>


  2. As an aside, you know that's actually a good bit useless?

    You can 'view source' and grab the stuff anyways.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.