-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to quickly create exceptions in logger
This is a feature under development, hidden behind a new advanced setting, `filterAuthorMode` which default to `false`. Ability to point-and-click to create temporary exception filters for static extended filters (i.e. cosmetic, scriptlet & html filters) from within the summary pane in the logger. The button to toggle on/off temporary exception filter is labeled `#@#`. The created exceptions are temporary and will be lost when restarting uBO, or manually toggling off the exception filters. Creating temporary exception filters does not cause the filter lists to reloaded, and thus there is no overhead in creating/removing these temporary exception filters.
- Loading branch information
Showing
9 changed files
with
203 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make it temporary though ?
Edit: I suggest you add a lock icon there like we have with dynamic filtering, so those who want to make it permanent, can do it from the logger itself.
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I set
filterAuthorMode
totrue
, then hostname is not shown in the specific cosmetic filters. Why is it like that ?If I set to
false
which is the default, it works as expected. Another regression ?Test link --
https://www.outtherecolorado.com/colorado-woman-chases-thrill-of-hiking-active-volcanoes/
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#@#
button highlighting is lost when dialog is closed and reopened.Fixed in 1.22.5b0
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Ok, reading again I agree I read too much into the question, sorry about this -- deleted).
I couldn't remember where this was informally discussed, I would have added a link to this in the commit.
The reason it's temporary is so that uBO does not have to reload all the filter lists -- it's something I have mentioned in a few places I wanted to implement since a while, a quick way to toggle temporary exception filters for quick test purpose without having to suffer the memory churn of reloading all the filter lists. The next step is to provide the same functionality for static network filters.
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that sentiment, you could disable reverse-lookup for filterlist for these temp. filters as they're not gonna be found in any filterlist anyways. Currently, it will show Static filter [insert filter here] could not be found in any of the currently enabled filter lists, so why not just disable it as the reverse lookup will never find the filter. Just an idea.
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to keep reverse-lookup as is, it may be useful to check whether the exception has been added to My filters or any one of the enabled lists -- people can still force a list update of add custom filters after a temporary exception has been created.
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are temp. scriptlet exception filters shown/created as generic filters ?
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they are generic internally.
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means a filter which is disabled on one site will be disabled everywhere even though that's not the intention for the filter author when testing --
example.com,google.com##+js(set, google, noopfunc)
Disabling the above filter on
example.com
will disable ongoogle.com
too.59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
These temporary exceptions are meant to quickly disable a filter for testing purpose. It's not yet in there as I wanted to think more about it but I will quite probably have all the temporary filters removed when the logger is closed.
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume these temp filters are removed if I close the browser ?
59c9a34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not persisted, so they go away when uBO is reloaded.