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

前端 未结 18 1421
囚心锁ツ
囚心锁ツ 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:09

    Hi i have a shorter version. this does same as a best answer. (it works on chrome 74.03)

    document.querySelectorAll('*').forEach(e => e.oncontextmenu = null)
    

提交回复
热议问题