Created
November 8, 2012 18:51
-
-
Save micho/4040725 to your computer and use it in GitHub Desktop.
embed_talker2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#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