Skip to content

Instantly share code, notes, and snippets.

@micho
Created November 8, 2012 18:51
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 micho/4040725 to your computer and use it in GitHub Desktop.
Save micho/4040725 to your computer and use it in GitHub Desktop.
embed_talker2.js
$("#talker2_link").remove()
Teambox.views.sidebar.apps_list.addApp("talker2", "New Group Chat", "#", "key");
$("#talker2_link a").click(function (e) {
e.preventDefault();
if (this.open) {
$(".chat_container").remove();
$(".content_wrap").css("bottom", "0px");
this.open = false;
} else {
var height = 250;
$(".chat_container").remove();
$('body').prepend('<div class="chat_container" style="position: fixed; bottom: 0; left: 191px; right: 0px; height: '+height+'px; border-top: 2px solid #999; border-left: 1px solid #999; z-index: 1;"><iframe src="http://client.talkerapp.com/?channel=teambox#nick=' + Teambox.models.user.get('username') + '" style="width: 100%;height: 100%;"></iframe></div>');
$(".content_wrap").css("bottom", (height+2)+"px");
this.open = true;
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment