Created
December 20, 2023 06:55
-
-
Save DefectingCat/d7e1a24988a2de9f23ede5a23e6f38cb to your computer and use it in GitHub Desktop.
WeChat and iOS WeChat regexp
This file contains 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
export const isWeChat = () => | |
/MicroMessenger/i.test(window.navigator.userAgent); | |
export const isWeChatSafari = navigator.userAgent.match( | |
/(?=iPhone|iPod)(?=.*(Safari|MicroMessenger))/i | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment