AEPKILL / devtools-detector

Detect if DevTools is open
https://blog.aepkill.com/demos/devtools-detector/
MIT License
1.09k stars 104 forks source link

Ios edge browser recognizes developer tool #74

Closed youdk1107 closed 1 month ago

youdk1107 commented 1 month ago

There is a problem with recognizing that the developer tool has been opened even if the developer tool is not opened in the iOS edge browser.

I have added an alert code to verify. capture

The ios edge version is 127.2651.96. capture2

AEPKILL commented 1 month ago

Fixed, but I don't have an iOS device to test it. If there are any problems, please reopen this issue.

youdk1107 commented 1 month ago

The error has not been resolved.

It seems that edge recognition is not possible because the value for distinguishing edge by useragent on iOS is EdgiOS.

If you modify the edge confirmation condition as below, it was recognized as normal.

/* edge / export const isEdge = /edge/i.test(userAgent) || /EdgiOS/i.test(userAgent);

The regToStringChecker function also seems to be detect regardless of developer tool usage in iOS edge browser.

There was no problem with other browsers, and only iOS edge browsers were experiencing problems.

AEPKILL commented 1 month ago

The error has not been resolved.

It seems that edge recognition is not possible because the value for distinguishing edge by useragent on iOS is EdgiOS.

If you modify the edge confirmation condition as below, it was recognized as normal.

/* edge /  export const isEdge = /edge/i.test(userAgent) ||导出 const isEdge = /edge/i.test(userAgent) || /EdgiOS/i.test(userAgent);

The regToStringChecker function also seems to be detect regardless of developer tool usage in iOS edge browser.

There was no problem with other browsers, and only iOS edge browsers were experiencing problems.

Ok, I have added this logic.

youdk1107 commented 1 month ago

The regToStringChecker function also seems to be detect regardless of developer tool usage in iOS edge browser.

As long as you modify the regToStringChecker function, it worked fine on iOS as well.

AEPKILL commented 1 month ago

The regToStringChecker function also seems to be detect regardless of developer tool usage in iOS edge browser.

As long as you modify the regToStringChecker function, it worked fine on iOS as well.

It was also fixed in the last modification.

https://github.com/AEPKILL/devtools-detector/blob/00a2d3e6cdedbefd113cb2cc0326bbbbd5796c81/src/checkers/reg-to-string.checker.ts#L29

https://github.com/AEPKILL/devtools-detector/commit/00a2d3e6cdedbefd113cb2cc0326bbbbd5796c81

- export const isWebkit = /webkit/i.test(userAgent) && !isEdge;
+ export const isWebkit = /webkit/i.test(userAgent);