From: Darren Date: Sat, 1 Oct 2011 13:39:49 +0000 (+0100) Subject: Highlight plugin updated X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3668b64a7357fedfb8c7742e7567b0bcda31600d;p=KiwiIRC.git Highlight plugin updated --- diff --git a/css/default.css b/css/default.css index b8b4580..ad20624 100644 --- a/css/default.css +++ b/css/default.css @@ -82,10 +82,10 @@ background-image: -moz-linear-gradient( } #kiwi .windowlist .active, #kiwi .utilityviewlist .active { padding-right:23px; } #kiwi .windowlist .highlight, #kiwi .utilityviewlist .highlight { - background-color: #990000; + background: #990000; font-weight: bold; } -#kiwi .windowlist .activity, #kiwi .utilityviewlist .activity { font-weight: bold; background-color: #009900; } +#kiwi .windowlist .activity, #kiwi .utilityviewlist .activity { font-weight: bold; background: #009900; } #kiwi .windowlist ul li img, #kiwi .utilityviewlist ul li img { width:1em; height:1em; top:7px; right:5px; position:absolute; } #kiwi .windowlist ul li img.icon, #kiwi .utilityviewlist ul li img.icon { left:5px; top:2px; height:auto; width:auto;} diff --git a/js/util.js b/js/util.js index 54584f8..7537858 100644 --- a/js/util.js +++ b/js/util.js @@ -127,20 +127,23 @@ var plugins = [ { name: "highlight", onaddmsg: function (event, opts) { + var tab = Tabviews.getTab(event.tabview.toLowerCase()); + + // If we have a highlight... if (event.msg.toLowerCase().indexOf(kiwi.gateway.nick.toLowerCase()) > -1) { - if (kiwi.front.cur_channel.name.toLowerCase() !== kiwi.front.tabviews[event.tabview.toLowerCase()].name) { - kiwi.front.tabviews[event.tabview].highlight(); + if (Tabview.getCurrentTab() !== tab) { + tab.highlight(); } - if (kiwi.front.isChannel(kiwi.front.tabviews[event.tabview].name)) { + if (kiwi.front.isChannel(tab.name)) { event.msg = '' + event.msg + ''; } } - if ( - !kiwi.front.isChannel(kiwi.front.tabviews[event.tabview].name) && kiwi.front.tabviews[event.tabview].name !== "server" - && kiwi.front.cur_channel.name.toLowerCase() !== kiwi.front.tabviews[event.tabview.toLowerCase()].name + // If it's a PM, highlight + if (!kiwi.front.isChannel(tab.name) && tab.name !== "server" + && Tabview.getCurrentTab().name.toLowerCase() !== tab.name ) { - kiwi.front.tabviews[event.tabview].highlight(); + tab.highlight(); } return event;