Quick Start
Relation ONE will inject a global API window.relationOne
to a website a user is visiting. This API allows the website to wake up the plugin and open a chat window with a friend.
Version requirement for the plugin
Please use it on v0.7.8 and later version
Injection detection for the plugin
if (typeof window.relationOne !== 'undefined') {
console.log('Relation ONE is installed!');
}
Waking up the chat window of the plugin:
Parameter
Type
Note
relationId
string
A friend's relationId
userName
string
A friend's user name
Open a chat window with a specified user:
if (window.relationOne && window.relationOne.chat) {
window.relationOne.chat({
relationId: 'xxx-xxx-xxx',
userName: 'xxxx',
})
}
Last updated