Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced Mute Engine #286

merged 17 commits into from Jan 14, 2018

Advanced Mute Engine #286

merged 17 commits into from Jan 14, 2018


Copy link

@pixeldesu pixeldesu commented Dec 18, 2017

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:

  • Add custom filters
  • Extends getDisplayType automatically, so the filter list looks just fine
  • Extends the global filter list template with custom filters that should be displayed in the dropdown
    You 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/

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.

pixeldesu added 9 commits Dec 18, 2017
鈥tterTweetDeck into feature/advanced-mute-engine
- Add ability to set placeholders for custom filters
- Add a license header
- Fix some code nits
- Document how filters work inside TweetDeck
Copy link
Contributor Author

@pixeldesu pixeldesu commented Dec 27, 2017

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.

This comment has been minimized.


eramdam Jan 6, 2018

I feel like a warning somewhere about performances and the fact that the function must be synchronous could be useful.

This comment has been minimized.


pixeldesu Jan 6, 2018
Author Contributor


eramdam approved these changes Jan 7, 2018
eramdam and others added 3 commits Jan 7, 2018
Copy link
Contributor Author

@pixeldesu pixeldesu commented Jan 11, 2018

Note: This feature will solve #253

pixeldesu added 4 commits Jan 12, 2018
- Add ability to set custom template string for action filters
- Restructure custom filter display attributes
- Update documentation for custom filters
@eramdam eramdam merged commit 5e92e23 into eramdam:master Jan 14, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@eramdam eramdam mentioned this pull request Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants