Skip to content

Commit

Permalink
filter out things that attempt to use launcher.launch in RSS feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
pontaoski committed Jul 10, 2019
1 parent 7a9025a commit 9a3a0b8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion web/js/search_methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,18 @@ $("#rss-feeds").rss(
limit: 1,
ssl: true,
layoutTemplate: "<div class=\"alert alert-info text-truncate text-center mb-0\" role=\"alert\">{entries}</div>",
entryTemplate: '<a class="news-link" onclick="bridge.openURL(\'{url}\')">{title}</a>'
entryTemplate: '<a class="news-link" onclick="bridge.openURL(\'{url}\')">{title}</a>',
filter: function(entry, tokens) {
console.log(tokens.url);
console.log(tokens.title);
if (tokens.url.includes("launcher.launch")) {
return false;
} else if (tokens.title.includes("launcher.launch")) {
return false;
} else {
return true;
}
}
},
)
});

0 comments on commit 9a3a0b8

Please sign in to comment.