Created
November 30, 2022 15:21
-
-
Save bgoewert/9491d38d02d4b154e28a7d78a080d2ea to your computer and use it in GitHub Desktop.
JS function to check if browser is using WebKit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isWebKit() { return /^iP/.test(navigator.platform || navigator.userAgent) || (/^Mac/.test(navigator.platform || navigator.userAgent) && navigator.maxTouchPoints > 2); || /Safari/.test(navigator.userAgent) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment