Advanced Mute Engine #286
Merged
Advanced Mute Engine #286
Conversation
…etterTweetDeck into feature/advanced-mute-engine
This PR is ready If there's anything I need to change, leave a review etc. and I'll adjust accordingly. |
is shown, it needs to `pass` filters. If a tweet passes, it's shown. Simple as that. | ||
|
||
So, in the function of your custom filter, you need to return `false` (or `t.positive` as an alternative) if something matches your filter. If your filter | ||
returns `true` it's assumed that this tweet doesn't match the current filter and is shown. |
eramdam
Jan 6, 2018
Owner
I feel like a warning somewhere about performances and the fact that the function must be synchronous could be useful.
I feel like a warning somewhere about performances and the fact that the function must be synchronous could be useful.
pixeldesu
Jan 6, 2018
Author
Contributor
added!
added!
Note: This feature will solve #253 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This feature adds the ability to extend BetterTweetDeck with custom filters easily.🎉
Before this, each custom filter would require taking
TD.vo.Filter.prototype.pass
apart and adding a new switch.To not break working behaviour of TweetDeck, the Advanced Mute Engine (AME) includes fallbacks to the old functions used.
The AME has following features:
getDisplayType
automatically, so the filter list looks just fineYou can hide filters from the dropdown (e.g. if you want to use them somewhere else)
The AME implementation is documented throughout, to not cause confusion on what it's actually doing. I also included documentation on the custom filters, how to add them etc. (see
docs/extend/filters.md
)This PR also includes the first custom filter (Hiding Retweets from Users) as a reference implementation.
I went sure that regular BTD would not break with the code submitted in this PR. To surely mitigate any upcoming issues it's recommended to let this code get through an extended beta-testing period.