Fix linkification target
The target attribute was passed to the wrong filter
This commit is contained in:
parent
09fa14da19
commit
1f601e56c8
2 changed files with 4 additions and 7 deletions
|
@ -215,7 +215,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
|
|||
</a>
|
||||
<button ng-if="debugMode" ng-click="countWatchers()">Count<br />Watchers</button>
|
||||
</div>
|
||||
<div class="title" ng-bind-html="activeBuffer().title | linky | DOMfilter:'irclinky':'_blank'" title="{{activeBuffer().title}}"></div>
|
||||
<div class="title" ng-bind-html="activeBuffer().title | linky:'_blank' | DOMfilter:'irclinky'" title="{{activeBuffer().title}}"></div>
|
||||
<div class="actions pull-right vertical-line-left">
|
||||
<div class="pull-left">
|
||||
<a class="settings-toggle" ng-click="showModal('settingsModal')" title="Options menu">
|
||||
|
@ -270,7 +270,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
|
|||
<td class="prefix"><a ng-click="addMention(bufferline.prefix)"><span ng-repeat="part in ::bufferline.prefix" ng-class="::part.classes" ng-bind="::part.text"></span></a></td><!--
|
||||
--><td class="message"><!--
|
||||
--><div ng-repeat="metadata in ::bufferline.metadata" plugin data="::metadata"></div><!--
|
||||
--><span ng-repeat="part in ::bufferline.content" class="text" ng-class="::part.classes" ng-bind-html="::part.text | linky | DOMfilter:'irclinky':'_blank' | DOMfilter:'inlinecolour'"></span>
|
||||
--><span ng-repeat="part in ::bufferline.content" class="text" ng-class="::part.classes" ng-bind-html="::part.text | linky:'_blank' | DOMfilter:'irclinky' | DOMfilter:'inlinecolour'"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="readmarker" ng-if="activeBuffer().lastSeen==$index">
|
||||
|
|
|
@ -25,7 +25,7 @@ weechat.filter('toArray', function () {
|
|||
});
|
||||
|
||||
weechat.filter('irclinky', ['$filter', function($filter) {
|
||||
return function(text, target) {
|
||||
return function(text) {
|
||||
if (!text) {
|
||||
return text;
|
||||
}
|
||||
|
@ -64,9 +64,6 @@ weechat.filter('DOMfilter', ['$filter', '$sce', function($filter, $sce) {
|
|||
return text;
|
||||
}
|
||||
|
||||
// hacky way to pass an extra argument without using .apply, which
|
||||
// would require assembling an argument array. PERFORMANCE!!!
|
||||
var extraArgument = (arguments.length > 2) ? arguments[2] : null;
|
||||
var filterFunction = $filter(filter);
|
||||
var el = document.createElement('div');
|
||||
el.innerHTML = text;
|
||||
|
@ -74,7 +71,7 @@ weechat.filter('DOMfilter', ['$filter', '$sce', function($filter, $sce) {
|
|||
// Recursive DOM-walking function applying the filter to the text nodes
|
||||
var process = function(node) {
|
||||
if (node.nodeType === 3) { // text node
|
||||
var value = filterFunction(node.nodeValue, extraArgument);
|
||||
var value = filterFunction(node.nodeValue);
|
||||
if (value !== node.nodeValue) {
|
||||
// we changed something. create a new node to replace the current one
|
||||
// we could also only add its children but that would probably incur
|
||||
|
|
Loading…
Reference in a new issue