update
-
+
How to use SIRC
setting
- - javascript needed
+ - Append the channel name (as hash fragment) where you want to join.
+ - (Ex) sirc.domain.com/sgm#snucse12
+ - That's all.
+ - Enjoy your ircing!
+ - https://github.com/sim0629/sirc/wiki
diff --git a/public_html/css/sirc.css b/public_html/css/sirc.css
index 41813df..b13f208 100644
--- a/public_html/css/sirc.css
+++ b/public_html/css/sirc.css
@@ -1,9 +1,9 @@
@charset "utf-8";
-div.datetime { font-size:8px; font-weight:normal; text-align:center; float:left; letter-spacing:-1px; line-height:1; }
-div.source { font-weight:normal; float:left; margin:0px 5px; }
+div.datetime { font-size:8px; text-align:center; float:left; letter-spacing:-1px; line-height:1; }
+div.source { float:left; margin:0px 5px; }
span.nick { font-weight:bold; }
-div.message { word-wrap:break-word; font-weight:normal; }
-ul#log li { padding:5px !important; border-color:#efefef; }
+div.message { word-wrap:break-word; }
+ul#log li { padding:5px !important; font-weight:normal; border-color:#efefef; }
label { float:left; padding-top:7px; }
diff --git a/public_html/js/sirc.js b/public_html/js/sirc.js
index 8d0577d..db4986f 100644
--- a/public_html/js/sirc.js
+++ b/public_html/js/sirc.js
@@ -66,6 +66,8 @@ var sirc_update = function() {
};
var sirc_send = function() {
+ var message = $('input#message').val();
+ if(message == '') return false;
$.ajax({
type: 'GET',
url: '/sgm/send/',
@@ -86,6 +88,7 @@ var sirc_send = function() {
};
var sirc_join = function() {
+ if(!window.location.hash) return;
channel = window.location.hash;
$('title').html(channel + ' - SIRC');
$('h1#channel').html(channel);
@@ -103,12 +106,5 @@ $(document).ready(function() {
$('form#send').submit(function() { return sirc_send(); });
$('input#message').keydown(function (e) { if(e.keyCode == 13) return sirc_send(); });
$(window).hashchange(function() { return sirc_join(); });
-
- if(!window.location.hash) {
- $('ul#log').html('
hash(channel) needed');
- $('ul#log').listview('refresh');
- return;
- }
sirc_join();
-
});