added together.js

This commit is contained in:
Matthew Scragg 2013-10-09 17:47:45 -05:00
parent ddea7f6f13
commit 701e30e52e

View file

@ -4,6 +4,26 @@
<script type="text/javascript" src="{{ ASSET_URL }}"></script> <script type="text/javascript" src="{{ ASSET_URL }}"></script>
{% endassets %} {% endassets %}
<script src="https://togetherjs.com/togetherjs-min.js"></script> <script src="https://togetherjs.com/togetherjs-min.js"></script>
<script>
TogetherJSConfig_getUserName = function () {
return {{ session['user'].get('username')|tojson }};
};
TogetherJSConfig_getUserAvatar = function () {
return {{ session['user'].get('avatar')|tojson }};
};
TogetherJSConfig_getUserColor = function () {
return '#ff00ff';
};
TogetherJS.on("ready", function () {
$("#start-togetherjs").addClass('btn-danger').html($(this).data('end-togetherjs-html'));
});
TogetherJS.on("close", function () {
$("#start-togetherjs").removeClass('btn-danger').html('Start TogetherJS')
});
</script>
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% block css %} {% block css %}