Linkify IRC channels

Make '#foo' in a message or buffer title clickable, taking the user to the IRC
channel specified, joining it if necessary.
This commit is contained in:
Lorenz Hübschle-Schneider 2014-02-16 14:10:56 +00:00
commit eaf5adf467
2 changed files with 32 additions and 8 deletions

View file

@ -182,7 +182,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
</a>
<button ng-show="debugMode" ng-click="countWatchers()">Count<br />Watchers</button>
</div>
<div class="title" ng-bind-html="activeBuffer().title | linky:'_blank'"></div>
<div class="title" ng-bind-html="activeBuffer().title | irclinky:'_blank'"></div>
<div class="actions pull-right vertical-line-left">
<div class="dropdown pull-left">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" title="Options menu">
@ -285,7 +285,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
<div bindonce id="bufferlines" class="monospace" ng-class="{'withnicklist': showNicklist}">
<div id="nicklist" ng-show="showNicklist" class="vertical-line-left">
<ul class="nicklistgroup list-unstyled" ng-repeat="group in activeBuffer().nicklist">
<li ng-repeat="nick in group.nicks|orderBy:'name'" ng-click="openQuery(nick.name)">
<li ng-repeat="nick in group.nicks|orderBy:'name'" ng-click="openBuffer(nick.name)">
<a ng-click="nickAction(nick)"><span bo-class="nick.prefixClasses" bo-text="nick.prefix"></span><span bo-class="nick.nameClasses" bo-text="nick.name"></span></a>
</li>
</ul>
@ -313,7 +313,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
<div ng-repeat="metadata in bufferline.metadata">
<div plugin data="metadata"></div>
</div>
<span ng-repeat="part in bufferline.content" class="text" bo-class="part.classes" bo-html="part.text|linky:'_blank'"></span>
<span ng-repeat="part in bufferline.content" class="text" bo-class="part.classes" bo-html="part.text|irclinky:'_blank'"></span>
</td>
</tr>
<tr class="readmarker" ng-if="activeBuffer().lastSeen==$index">