How to re-enable right click so that I can inspect HTML elements in Chrome?

前端 未结 18 1399
囚心锁ツ
囚心锁ツ 2021-01-29 20:55

I am looking at a web page which has overwritten the right-click button so to display its own popup HTML element.

This prevents me from using Chrome Developer Tools to

18条回答
  •  一生所求
    2021-01-29 21:14

    I just visited this site and it really bugged me,

    apparently there are a couple ways to disable the mouse click:

    1)

    
    

    and

    
    

    ...

    in this case what you will have to do in the dev tools is :

    document.removeEventListener("onmousedown",disableclick);
    document.oncontextmenu = function(){}
    

    2)

    using flash as a content wrapper - no solution here except taking a screenshot

    3)

    some sites want to prevent downloading images via right click -> save image as

    so what they do is put this:

    which is a transparent image spreding on the full width and height of the screen all you need to do is go to the elements inspector and find the div and delete it.

    In my case #1 did the trick

提交回复
热议问题