js code:
var bEnabled = true;
function OnEvent_Initialize () {
if ( Messenger.MyStatus < STATUS_INVISIBLE ) return false;
if ( Messenger.MyEmail !== 'johndoe@hotmail.com' ) {
bEnabled = false;
}
}
function OnEvent_SigninReady () {
OnEvent_Initialize ();
}
Then before doing anything check the variable bEnabled
js code:
function OnEvent_ChatWndReceiveMessage ( ... ) {
if ( bEnabled === true ) {
// ... do things here
}
}