proginosko / LeechBlockNG

LeechBlock NG (Next Generation) for Firefox is a simple productivity tool designed to block those time-wasting sites that can suck the life out of your working day. All you need to do is specify which sites to block and when to block them.
https://www.proginosko.com/leechblock/
Mozilla Public License 2.0
694 stars 64 forks source link

Delaying block when editing comment/form #211

Closed ABuffEr closed 8 months ago

ABuffEr commented 3 years ago

Hi, I'm using this great extension to block Facebook home, from 11:30 to 20:00. It works, but, sometimes, it happened also that I started to write a comment at 11:29, and then LeechBlock blocked the page and my comment was lost. Considering that Firefox, detecting that I not submitted the comment yet, shows a prompt asking whether I want remaining or leaving the page (but when it already blocked), could LeechBlock take in consideration this situation in any way? Thanks a lot :)

proginosko commented 3 years ago

That's a good suggestion. I'll add it to the feature request list.

MayeulC commented 1 year ago

Something related: I sometimes write a comment, and submit it past the blocking time on websites such as Hacker News, Reddit, GamingOnLinux or Phoronix (those are my time sinks).

It's extremely jarring to write a thoughtful comment, supplemented by research and external data, only to see it lost forever because I didn't check the timer before clicking the submit button (those blocks are not immediate). If Firefox loses connection when submitting them, it will offer to resubmit the POST form. No such thing with LeechBlock. I'd suggest one of the following solutions:

I'd usually use an extension like "Form History Control" to avoid that sort of issue, but it's useless in private browsing.

I can make this a separate issue/feature request if you prefer, but I thought it was related.

proginosko commented 1 year ago

I've been thinking about the best way to resolve these issues. Asking for confirmation before blocking seems like an obvious solution, but I can also see it being abused as a loophole. LB's core philosophy is, "When the blocking conditions are met, you block, baby, block!" So I wonder about a feature that would save the content of any text boxes before blocking and allow the user to recover it from the blocking page.

MayeulC commented 1 year ago

That would probably work. I also use the Form History control extension to do that to an extent, though I do not enable it in private browsing windows.

Just a random thought: Can't LB perform a "soft block", replacing the DOM tree of the page (and storing it somewhere) instead of intercepting the request and losing POST data? Let POST through, and only display LB's interface.

ABuffEr commented 1 year ago

Hi, just a thought (not so technical): but a "snooze" dialog to delay the block until browser says there is something not submitted? That popups each 1-2 minutes and blocks if user don't answer quickly, so to not be a a practical loophole...