[SOLVED] How to detect the Safari browser?

How to know in the code that the game is launched in the Safari browser?

The code
console.log(navigator.userAgent);
gives the result:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 YaBrowser/23.1.4.777 Yowser/2.5 Safari/537.36

As if the browser were all of them at the same time.

1 Like

Thank you. It works fine.