|
|
@ -146,17 +146,6 @@ weechat.filter('DOMfilter', ['$filter', '$sce', function($filter, $sce) { |
|
|
|
}; |
|
|
|
}; |
|
|
|
}]); |
|
|
|
}]); |
|
|
|
|
|
|
|
|
|
|
|
// This is used by the cordova app to change link targets to "window.open(<url>, '_system')"
|
|
|
|
|
|
|
|
// so that they're opened in a browser window and don't navigate away from Glowing Bear
|
|
|
|
|
|
|
|
weechat.filter('linksForCordova', ['$sce', function($sce) { |
|
|
|
|
|
|
|
return function(text) { |
|
|
|
|
|
|
|
// XXX TODO this needs to be improved
|
|
|
|
|
|
|
|
text = text.replace(/<a (rel="[a-z ]+"\s+)?(?:target="_[a-z]+"\s+)?href="([^"]+)"/gi, |
|
|
|
|
|
|
|
"<a $1 onClick=\"window.open('$2', '_system')\""); |
|
|
|
|
|
|
|
return $sce.trustAsHtml(text); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
weechat.filter('getBufferQuickKeys', function () { |
|
|
|
weechat.filter('getBufferQuickKeys', function () { |
|
|
|
return function (obj, $scope) { |
|
|
|
return function (obj, $scope) { |
|
|
|
if (!$scope) { return obj; } |
|
|
|
if (!$scope) { return obj; } |
|
|
|