Skip to content

Instantly share code, notes, and snippets.

@bgoewert
Created November 30, 2022 15:21
Show Gist options
  • Save bgoewert/9491d38d02d4b154e28a7d78a080d2ea to your computer and use it in GitHub Desktop.
Save bgoewert/9491d38d02d4b154e28a7d78a080d2ea to your computer and use it in GitHub Desktop.
JS function to check if browser is using WebKit.
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