快速开始

Relation ONE将一个全局API window.relationOne 注入到用户访问的网站中。这个API允许网站主动唤醒插件打开与好友的聊天页。


插件版本说明

请在v0.7.8及以上版本使用


插件注入检测

if (typeof window.relationOne !== 'undefined') {
  console.log('Relation ONE is installed!');
}

唤醒插件聊天页

参数类型说明

relationId

string

好友的relationId

userName

string

好友的用户名

打开与指定好友的聊天页

if (window.relationOne && window.relationOne.chat) {
  window.relationOne.chat({
    relationId: 'xxx-xxx-xxx',
    userName: 'xxxx',
  })
}

Last updated