The ability to pull up any user's profile by simply typing their name in. I have some javascript code that you might be able to use to incorporate into your extension.
Get the "room":
for (var a in turntable) {
var b = turntable[a];
if (typeof b !== "object" || b === null) {
continue
}
if (typeof b.setupRoom !== "undefined") {
room = b;
}
}
Get the room manager:
for (var a in room) {
var b = room[a];
if (typeof b !== "object" || b === null) {
continue
}
if (typeof b.blackswan !== "undefined") {
var manager = b;
}
}
Get the websocket for the API. You may be able to use your TTPAPI for this part:
var a = / Preparing message /i;
for (var b in turntable) {
var c = turntable[b];
if (typeof c !== "function") {
continue
}
c.toString = Function.prototype.toString;
if (a.test(c.toString())) {
ttApi = c;
}
}
Pull up the profile:
javascript: var userName = prompt('User to search for:');
if (userName != null) {
ttApi({
api: 'user.get_id',
name: userName
}, function (m) {
if (m.err) {
turntable.showAlert('Error: ' + m.err);
} else {
manager.callback('profile', m.userid);
}
});
}
The ability to pull up any user's profile by simply typing their name in. I have some javascript code that you might be able to use to incorporate into your extension.
Get the "room":
Get the room manager:
Get the websocket for the API. You may be able to use your TTPAPI for this part:
Pull up the profile: