Remove useless linksForCordova filter

We deprecated the cordova app long ago
codeql
Lorenz Hübschle-Schneider 5 years ago
parent 85dc498fdd
commit 3858c0ff0c
  1. 11
      js/filters.js

@ -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; }

Loading…
Cancel
Save