diff --git a/README.md b/README.md index bd7ff8f9..b5815987 100644 --- a/README.md +++ b/README.md @@ -104,18 +104,11 @@ Pretty simple, huh? If you want to edit users manually, see `users/example/user.json`. -## Custom paths - -You can define Shout's file storage path via the following options: - -- Add an entry called `home` to the `config.json` file. -- Set the environment variable `SHOUT_HOME` before calling the shout executable. -- Use the default of `$HOME/.shout`. - ## Commands These are the commands currently implemented: +- [x] /clear - [x] /close - [x] /connect - [x] /deop diff --git a/client/css/style.css b/client/css/style.css index fffab5a1..6a054c8a 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -446,8 +446,8 @@ button { position: absolute; width: 100%; } -#chat .show-more + .messages .msg:first-child span { - padding-top: 54px; +#chat .show-more:hover { + opacity: 1; } #chat .messages { display: table; diff --git a/client/js/shout.js b/client/js/shout.js index 0ad05c08..b9426993 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -190,7 +190,7 @@ $(function() { if (data.messages.length != 100) { var more = chan .find(".show-more") - .remove(); + .addClass("hidden"); } }); @@ -317,6 +317,9 @@ $(function() { e.preventDefault(); var text = input.val(); input.val(""); + if (text.indexOf("/clear") === 0) { + return clear(); + } socket.emit("input", { target: chat.data("id"), text: text @@ -572,12 +575,16 @@ $(function() { "ctrl+l", "ctrl+shift+l" ], function (e) { - // Only clear the chat if the main input is focused. - if( e.target === input[0] ) { - chat.find(".active .chat .messages").empty(); + if(e.target === input[0]) { + clear(); } }); + function clear() { + chat.find(".active .messages").empty(); + chat.find(".active .show-more").removeClass("hidden"); + } + function complete(word) { var words = commands.slice(); var users = chat.find(".active") diff --git a/client/js/shout.templates.js b/client/js/shout.templates.js index 3509a49e..2ad5a5d8 100644 --- a/client/js/shout.templates.js +++ b/client/js/shout.templates.js @@ -33,7 +33,7 @@ templates['chat'] = template({"1":function(depth0,helpers,partials,data) { + "\n " + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper))) + " \n \n