How to uninstall/remove Developer Tools from Google Chrome?

后端 未结 5 2216
野性不改
野性不改 2020-12-17 19:05

Our users should use Ctrl+Shift+J shortcut in web application.

We have tried Chrome switchers like \'--disable-dev-tools\' but it not works in our scenario.

5条回答
  •  一生所求
    2020-12-17 19:09

    window.oncontextmenu = function () {
       return false;
    }
    document.onkeydown = function (e) { 
        if (window.event.keyCode == 123 ||  e.button==2)    
        return false;
    }
    

    Use this code to disable rightclick & F12 on ur page, but there is no way to stop a user from opening Dev Tools Menu > Tools > Developer tools

    Hope this helped!!

提交回复
热议问题