Closed glaebhoerl closed 4 years ago
LB is behaving as intended here. Whether that behavior is expected is another matter!
The filter option is treated just like a blocking page. If the conditions for blocking are met, the filter is applied. With a blocking page, the user would have to reload the blocked page. Likewise, then, for the filtered page.
If you set things up to apply the filter to every website, that's why the filter was applied to the content in all tabs.
All this to say, technically there's no bug here. It would require some additional code (non-trivial) to change the behavior to undo the filter once the blocking period has passed.
I see, thank you for the clarification. Shall I close this then?
(It does seem like the alternative behavior would be more useful, for what it's worth, but maybe there are other use cases I'm not seeing.)
Leave it open for now. Let's see if there's demand for different behavior. I'll add it to the requested features list in the meantime.
I would also like this option. When a page is blocked, it is obvious that it has to be loaded again, because it has been replaced with the block page (or blanked, depending on settings). When filtered, the content is still visible. The filter going away without having to reload seems reasonable to me in that context.
FWIW I recently discovered that I can uncheck the "immediately block pages on these sites once blocking conditions are met" checkbox which strikes a somewhat better balance for me. The ideal would still be if it applied to every tab (or every tab I click on) and also turned itself off automatically.
to me, the main benefit of using filter instead of block page would be to preserve page content as-is when the blocking ends. having to reload defeats this purpose and makes it only an optical gimmick with little benefit. Also, I did a test drive (using not LeechBlock but the Firefox debugger) with the filters you are offering, and have some doubt about the choices. One filter I would find fairly effective is blur(5px). Maybe you could make the list of filters user-editable somehow instead of hardwired in the code? In that case it would add flexibility to include the parameter in the selected value instead of nailing it down to 100% which is not compatible with some filters (see my blur example). You mention that it would be difficult to automatically unblock. I observe that when I have open a page subject to a rule that does not have "mmediately block pages on these sites once blocking conditions are met" set, the timer stays at 0:00 and resets itself to a higher value or disappears when a permitting period starts. So you could hook the filter-release code in a piece of code like "if timer was zero and now is not zero and blocking method is filter, then set filter to none" or something like that. Maybe not consider the page "blocked" when it is filtered, since it is still there, so the required logic isn't disabled? Many thanks for developing and maintaining LeechBlockNG!
Thanks for the feedback. I'm going to add a blur option to the next version, and also try to change it so that the filter is removed when the block expires.
Implemented in version 1.0.6.
(I assume this happens with any of the filters but haven't tried.)
Here is what I did:
Around 1AM, added a new block set to apply the sepia filter to every website between 0000 and 0500, and checked that it works on a couple of tabs
Went to bed, suspended laptop
Woke up around 11AM, resumed laptop
(I also manually changed the system timezone by an hour at this point for unrelated reasons, in case that's relevant)
What I expected:
What actually happened:
All of my tabs which had content loaded (i.e. except for the ones which I haven't accessed since the last time restarting firefox) are in sepia, even the ones I never looked at since creating the block set
LeechBlock NG: Version 1.0.4 Last Updated March 19, 2020
Firefox: 69.0.2