Reputation: 69
Since Google Chrome 71, using !!window.chrome && !!window.chrome.webstore;
to detect Google Chrome in javascript doesn't work anymore. It's pretty recent so I don't seem to find a good replacement yet.
Anybody know a good way to detect Google Chrome without window.chrome.webstore
? Or are we stuck using navigator.userAgent.indexOf("Chrome") !== -1
in the meantime?
Thanks!
Upvotes: 6
Views: 1030
Reputation: 19
You should try this:
var isChrome = /Google Inc/.test(navigator.vendor);
Upvotes: 1