theajack / disable-devtool

Disable web developer tools from the f12 button, right-click and browser menu
https://theajack.github.io/disable-devtool/
MIT License
1.78k stars 169 forks source link

The init code force the browser tab be closed #83

Open gezichenshan opened 6 months ago

gezichenshan commented 6 months ago
import DisableDevtool from "disable-devtool"
DisableDevtool({ md5: "75edd0df185c0b8ecf13b27365ee11b6" })

The code above will close the tab.

Then I added:

...
  DisableDevtool({
    ondevtoolopen: type => {
      const info = "devtool opened!; type =" + type
      alert(info) // If you are worried about blocking the page, use console.warn(info); and open the console to view
    },
  })

It always let the page alert message constantly jump between:

devtool opened!; type =3
devtool opened!; type =4
theajack commented 6 months ago

Please send me the browser and version number you are using. @gezichenshan

gezichenshan commented 6 months ago

Chrome 121.0.6167.185(正式版本) (64 位) Win11

Same happened on Edge

theajack commented 6 months ago

https://theajack.github.io/disable-devtool

用这个链接复现吗 @gezichenshan