From eaab80b4dff5114658e8cc3f08e0fdc5509e89c8 Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 22 Jul 2011 20:21:39 +0100 Subject: [PATCH] Clickable channel name --- index.php | 11 +++++++---- js/front.js | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index a42c922..28eb811 100644 --- a/index.php +++ b/index.php @@ -88,13 +88,16 @@ function addEvents(){ - $('.more_link').click(function(){ $('.content.bottom').slideDown('fast'); $('.network').focus(); return false; }); - $('.formconnectwindow').submit(function(){ + $('#kiwi .more_link').click(function(){ $('.content.bottom').slideDown('fast'); $('.network').focus(); return false; }); + $('#kiwi .formconnectwindow').submit(function(){ init_data.channel = $('#channel').val(); return false; }); - $('a.connect').click(function(){ $('.formconnectwindow').submit(); return false; }); - $('a.chan').live('dblclick', function() { front.joinChannel($(this).text()); }); + $('#kiwi a.connect').click(function(){ $('.formconnectwindow').submit(); return false; }); + $('#kiwi .messages a.chan').live('click', function() { + front.joinChannel($(this).text()); + return false; + }); } diff --git a/js/front.js b/js/front.js index 97b01e1..8d5bfda 100644 --- a/js/front.js +++ b/js/front.js @@ -1010,7 +1010,7 @@ tabview.prototype.addMsg = function(time, nick, msg, type, style){ if(next == '') msg =+ ''; } - var re = '\\B(' + gateway.channel_prefix + '[^ ,\\007]+)'; + var re = '\\B(' + gateway.channel_prefix + '[^ ,.\\007]+)'; re = new RegExp(re, 'g'); msg = msg.replace(re, function(match) { -- 2.25.1