Created
November 25, 2020 01:15
-
-
Save ntnyq/edbb4c38bca783bde1bffdbf363d4194 to your computer and use it in GitHub Desktop.
Connect with qq
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
const RE_MOBLE_DEVICE = /(iPhone|iPad|iPod|iOS|android)/i | |
const QQ_NUMBER = 123456 | |
if (RE_MOBLE_DEVICE.test(navigator.userAgent)) { | |
window.open( | |
`mqqwpa://im/chat?chat_type=wpa&uin=${QQ_NUMBER}&version=1&src_type=web&web_src=http://wpa.b.qq.com` | |
) | |
} else { | |
window.open( | |
`http://wpa.qq.com/msgrd?v=3&uin=${QQ_NUMBER}&site=在线客服&menu=yes` | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment