sdasda7777 / ScheduleBlock

Browser extension that allows you to block any set of websites based on a schedule.
GNU General Public License v3.0
11 stars 1 forks source link

How do I get this to work? #4

Open FernandoBMartin opened 7 months ago

FernandoBMartin commented 7 months ago

Hello,

I'm new to the extension and read the instruction but I can't get it to work reliably unfortunately. Could someone explain what I need to do, to only access youtube between 20:00 and 22:00?

I thought regular expression would be 'youtube', 00:00-20:00,22:00-23:59 in 'hard locked', leave 'timer' and 'soft locked' empty. I got it to lock a couple of times by only doing 00:00-20:00, but then it stopped working agian.

Thany you very much! :)

sdasda7777 commented 7 months ago

Hi, you're right, I would hope that would work as well. I seem to be able to replicate it somewhat, I'll look into it asap.

sdasda7777 commented 7 months ago

I thought regular expression would be 'youtube', 00:00-20:00,22:00-23:59 in 'hard locked', leave 'timer' and 'soft locked' empty.

@FernandoBMartin Can you confirm that if you do this, it triggers as long as you wait on the page for about 15 seconds?

FernandoBMartin commented 7 months ago

I thought regular expression would be 'youtube', 00:00-20:00,22:00-23:59 in 'hard locked', leave 'timer' and 'soft locked' empty.

@FernandoBMartin Can you confirm that if you do this, it triggers as long as you wait on the page for about 15 seconds?

When I only use 00:00-20:00, it triggers after 15s as you said. When I use the 22:00-23:59 as well, it doesn't trigger at all.

sdasda7777 commented 7 months ago

I see, that's strange. Obviously you shouldn't have to wait 15 seconds for it to trigger, meaning the initial check seems to be broken.

Adding the 22:00-23:59 doesn't change this behaviour for me, though. Perhaps it's a separate bug? Would your current time happen to be in the 22:00-23:59 range? 🤔

FernandoBMartin commented 7 months ago

I see, that's strange. Obviously you shouldn't have to wait 15 seconds for it to trigger, meaning the initial check seems to be broken.

Adding the 22:00-23:59 doesn't change this behaviour for me, though. Perhaps it's a separate bug? Would your current time happen to be in the 22:00-23:59 range? 🤔

No, it's actually 12:10 here

sdasda7777 commented 7 months ago

Hmm, I see. I'll try fixing the initial check issue at the very least, maybe something pops up.

sdasda7777 commented 7 months ago

Oh, I think I figured it out. To have it trigger immediately, you have to also set the "Soft locked hours". I admit this is not very intuitive, but I'm not sure if this behaviour should be changed, in case it's useful for someone 😅

FernandoBMartin commented 7 months ago

Oh, I think I figured it out. To have it trigger immediately, you have to also set the "Soft locked hours". I admit this is not very intuitive, but I'm not sure if this behaviour should be changed, in case it's useful for someone 😅

It does lock now, also when I have the 22:00-23:59 time range in. I'll get back to you when I know if it just works fine in general now. Thank you very much :)

FernandoBMartin commented 7 months ago

Oh, I think I figured it out. To have it trigger immediately, you have to also set the "Soft locked hours". I admit this is not very intuitive, but I'm not sure if this behaviour should be changed, in case it's useful for someone 😅

Unfortunately it just unlocked before it should, I think there might still be a couple of things wrong with the code. I definitely wish you all the best for this project and I'll check in on it some time, but as of now it's still too fragile to be practical. All the best and thanks for your effort!

sdasda7777 commented 7 months ago

Could you be more specific about the details of it misbehaving? I really can't fix it when I'm not sure what is broken 😄

FernandoBMartin commented 7 months ago

Could you be more specific about the details of it misbehaving? I really can't fix it when I'm not sure what is broken 😄

Well, simple: I did what we last wrote about, it locked & showed the right countdown to when it should unlock. I looked at it 10min before it should unlock and it was already unlocked. Same thing for twitter, with which I used the same setup.

sdasda7777 commented 7 months ago

Hmm, so after you clicked the "Go back" button, you were able to visit the site without it kicking you out? Or was the page already open when you visited the tab?

FernandoBMartin commented 7 months ago

I had nothing open, didn't klick go back. Just typed the youtube URL, it opened, no lock.

sdasda7777 commented 7 months ago

I see. I'm really sorry, but unless I can personally replicate it, I can't really fix it. I'm currently not aware how this could happen when the extension is enabled. However, if you figure out anything that would at least hint as to under which conditions it works incorrectly, I would be happy to look into it.

FernandoBMartin commented 7 months ago

Not a problem mate, It was free so I'm not complaining at all. I'll see if it locks again later, maybe check it some other time again, ok? :)

sdasda7777 commented 7 months ago

Of course, thanks!