Skip to content

Commit

Permalink
how to use
Browse files Browse the repository at this point in the history
  • Loading branch information
sim0629 committed Apr 26, 2012
1 parent 1ffeead commit 3c2731f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 6 additions & 2 deletions public_html/channel.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div id="wrapper" data-role="page">
<div data-role="header" data-position="fixed" data-theme="d">
<a id="update" data-role="button" data-icon="refresh" data-iconpos="notext">update</a>
<h1 id="channel"></h1>
<h1 id="channel">How to use SIRC</h1>
<a id="setting" data-role="button" data-icon="gear" data-iconpos="notext">setting</a>
<div id="menu" style="display:none;">
<ul data-role="listview">
Expand All @@ -39,7 +39,11 @@ <h1 id="channel"></h1>
</div>
<div data-role="content" data-theme="d">
<ul id="log" data-role="listview">
<li>javascript needed</li>
<li>Append the channel name (as hash fragment) where you want to join.</li>
<li>(Ex) sirc.domain.com/sgm<strong>#snucse12</strong></li>
<li>That's all.</li>
<li>Enjoy your <strong>irc</strong>ing!</li>
<li>https://github.com/sim0629/sirc/wiki</li>
</ul>
</div>
<div data-role="footer" data-position="fixed" data-theme="d">
Expand Down
8 changes: 4 additions & 4 deletions public_html/css/sirc.css
Original file line number Diff line number Diff line change
@@ -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; }

10 changes: 3 additions & 7 deletions public_html/js/sirc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
Expand All @@ -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);
Expand All @@ -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('<li>hash(channel) needed</li>');
$('ul#log').listview('refresh');
return;
}
sirc_join();

});

0 comments on commit 3c2731f

Please sign in to comment.