Skip to content

Instantly share code, notes, and snippets.

@ntnyq
Created November 25, 2020 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntnyq/edbb4c38bca783bde1bffdbf363d4194 to your computer and use it in GitHub Desktop.
Save ntnyq/edbb4c38bca783bde1bffdbf363d4194 to your computer and use it in GitHub Desktop.
Connect with qq
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