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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: timed opening #24

Open
cheater opened this issue Jul 12, 2020 · 8 comments
Open

Feature request: timed opening #24

cheater opened this issue Jul 12, 2020 · 8 comments

Comments

@cheater
Copy link

cheater commented Jul 12, 2020

Hi! I love tabclip, it's my top favourite addon after uBlock Origin. Thanks a lot for making it!

There's one thing that I would love it to do that it doesn't right now. I sometimes open a lot of tabs at the same time (for example, moving a window of tabs from one Firefox profile to another one). Tabclip opens all tabs at the same time. So if it's e.g. google search results, google will eventually ban me and require me to solve a captcha. If it's steam store pages, then I'll get temporarily banned as well. I would appreciate a setting that lets me set the wait time between opening subsequent pages.

In the current UI, the "paste part" looks like this:

[] In Background
[Paste]

You could change it to:

[] In Background
[] Wait between tabs: [__] seconds
[Paste]

where [__] means a text field. It should default to zero. If it is empty or contains zero there should be no wait at all. It should accept decimal points.

I would really appreciate it if you could add this feature!

Currently there is another addon called "Multiple URL Opener" that does this, but it's ad/spyware - it hijacks the url of the new tab page and sets it to some odd search engine. I've only found it after searching for it today - I've been using tabclip for ages and I'd love to keep using only that.

Thank you!

@cheater cheater changed the title Featured request: timed opening Feature request: timed opening Jul 12, 2020
@joshdick
Copy link
Owner

That shouldn’t be too difficult to implement, I’ll try to make time for it this week.

Thanks for the suggestion!

@cheater
Copy link
Author

cheater commented Jul 13, 2020

Wow, thanks a lot!

Thinking I should add some more suggestions... :-)

@cheater
Copy link
Author

cheater commented Jul 28, 2020 via email

@joshdick
Copy link
Owner

I took a look last week and forgot to write an update here, sorry!

I was able to get basic open-with-delay working more or less as I anticipated, but there's a problem with the implementation: it stops opening tabs in the background if the popup is dismissed.

I'm not completely sure it's fixable at all, but if it is, a larger reworking of the way tabs are opened throughout the extension will be required.

I haven't had a chance to do this larger reworking yet. No promises on the timeline, I'll get to it when I can.

@cheater
Copy link
Author

cheater commented Jul 29, 2020

Thanks! Sorry to hear you hit a snag. I'm sure you'll figure something out, though!

@cheater
Copy link
Author

cheater commented Aug 14, 2020

I took a look last week and forgot to write an update here, sorry!

I was able to get basic open-with-delay working more or less as I anticipated, but there's a problem with the implementation: it stops opening tabs in the background if the popup is dismissed.

I'm not completely sure it's fixable at all, but if it is, a larger reworking of the way tabs are opened throughout the extension will be required.

I haven't had a chance to do this larger reworking yet. No promises on the timeline, I'll get to it when I can.

One thing I've seen other plugins do is they will open a tab for the time they are executing something longer. I think that could work well in this situation. It's what that other plugin does too (Multiple URL Opener).

@cheater
Copy link
Author

cheater commented Jun 27, 2021

What if you opened new tabs as something like:

moz-extension://abcdefg-d0a5-485c-961f-617de924402d/wait.html?timestamp=1298765981&url=...

wait.html would wait until the timestamp has been reached, and then navigate to the url. This wouldn't rely on the pop-up UI.

@cheater
Copy link
Author

cheater commented Jun 27, 2021

Note that this could still create an issue if your PC freezes for like a minute (due to eg IO issues or OOM) and then resumes - it could resume after a bunch of tabs have been scheduled to open. But it's better than nothing, I think.

Maybe a for() loop with a timer that measures time differences could be resilient to this, something like:

for (wait = get_wait_time_from_url(); wait > 0; wait--) {
  sleep(1)
}
navigate_to_url()

this would make sure that at least the adequate amount of seconds had been waited, and that if one tab is set to wait 60 seconds and another is set to wait 61 seconds, then they will open at least 1 second apart, even if there was a, say, 180-second pause due to OOM somewhere in the middle.

This would require this sort of URL format, different than the one in the previous comment:

moz-extension://abcdefg-d0a5-485c-961f-617de924402d/wait.html?wait=60&url=...

Note that this isn't a rare scenario, for example I often have heavy compilations running in the background, and my browser will freeze for a second or five. I'm sure people with slower PCs experience that not so infrequently too. The solution is simple too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants