diff --git a/channel.js b/channel.js
index 7041756f..1d0fd7d4 100644
--- a/channel.js
+++ b/channel.js
@@ -193,7 +193,6 @@ Channel.prototype.saveDump = function() {
// Save channel dumps every 5 minutes, in case of crash
function incrementalDump(chan) {
if(chan && chan.users && chan.users.length > 0) {
- console.log("dumping " + chan.name);
chan.saveDump();
setTimeout(function() { incrementalDump(chan); }, 300000);
}
diff --git a/www/assets/js/client.js b/www/assets/js/client.js
index 0c6ad10b..7f7c33c0 100644
--- a/www/assets/js/client.js
+++ b/www/assets/js/client.js
@@ -68,7 +68,8 @@ var USEROPTS = {
show_timestamps : parseBool(getOrDefault("cytube_show_timestamps", false)),
modhat : parseBool(getOrDefault("cytube_modhat", false)),
blink_title : parseBool(getOrDefault("cytube_blink_title", false)),
- sync_accuracy : parseFloat(getOrDefault("cytube_sync_accuracy", 2)) || 2
+ sync_accuracy : parseFloat(getOrDefault("cytube_sync_accuracy", 2)) || 2,
+ chatbtn : parseBool(getOrDefault("cytube_chatbtn", false))
};
applyOpts();
$("#optlink").click(showUserOpts);
diff --git a/www/assets/js/functions.js b/www/assets/js/functions.js
index d1e22fbd..32272a9a 100644
--- a/www/assets/js/functions.js
+++ b/www/assets/js/functions.js
@@ -909,6 +909,12 @@ function showUserOpts() {
blink.prop("checked", USEROPTS.blink_title);
addOption("Chat Notice", blinkcontainer);
+ var sendbtncontainer = $("").addClass("checkbox")
+ .text("Add a send button to the chatbox");
+ var sendbtn = $("").attr("type", "checkbox").appendTo(sendbtncontainer);
+ sendbtn.prop("checked", USEROPTS.chatbtn);
+ addOption("Send Button", sendbtncontainer);
+
var profimg = $("").attr("type", "text")
profimg.val(PROFILE.image);
addOption("Profile Image", profimg);
@@ -945,6 +951,7 @@ function showUserOpts() {
USEROPTS.hidevid = hidevid.prop("checked");
USEROPTS.show_timestamps = showts.prop("checked");
USEROPTS.blink_title = blink.prop("checked");
+ USEROPTS.chatbtn = sendbtn.prop("checked");
if(RANK >= Rank.Moderator) {
USEROPTS.modhat = modhat.prop("checked");
}
@@ -1008,6 +1015,22 @@ function applyOpts() {
if(USEROPTS.hidevid) {
$("#videodiv").remove();
}
+
+ if(USEROPTS.chatbtn) {
+ $("#chatline").removeClass("span5").addClass("span4")
+ .css("float", "left");
+ var btn = $("").addClass("btn span1")
+ .text("Send")
+ .appendTo($("#chatdiv"));
+ btn.click(function() {
+ if($("#chatline").val().trim()) {
+ socket.emit("chatMsg", {
+ msg: $("#chatline").val()
+ });
+ $("#chatline").val("");
+ }
+ });
+ }
}
function idToURL(data) {