htrinter / Open-Multiple-URLs

Browser extension for opening lists of URLs built on top of WebExtension with cross-browser support
GNU General Public License v3.0
251 stars 57 forks source link

Open tabs one by one and add a delay between opening #16

Closed fakhamatia closed 4 years ago

fakhamatia commented 4 years ago

Open tabs one by one and add a delay between opening not once open all tabs. Because web servers block IP, they think its attack or something I open 50 tabs from a site and its opened in error 503 page, I have to refresh one by one all 50 tabs.

jtagcat commented 4 years ago

Create an issue per problem, moved the incognito part to #17.

This issue could be easily solved by adding a sleep in let loops. This should be configurable in settings as well. I can add this to #14.

htrinter commented 4 years ago

I think it is an interesting new feature. It covers an edge case though, that I think does not affect a lot of people. To me, it is not worth implementing as part of this extension. But maybe the fork by @jtagcat solves your problem.

jtagcat commented 4 years ago

@htrinter as a general discussion:

I think there will be loads of edge case easy-to-implement feature requests. Thoughts on an advanced collapsible section for less-used features?

htrinter commented 4 years ago

I think there will be loads of edge case easy-to-implement feature requests.

I think you are right. The extension is a solution I cobbled together to solve a problem I had. I published it because I thought it had a good chance of solving a problem many other people have as well. And it does. Personally, I do not want to become "the king of every possible url opening need people have". And I think long-term the extension has the best chance to provide the most value to people if it stays easy to maintain.

That said, there are use cases that an extended extension could fulfill. I think they would be best served with a separate extension, maybe simply named "URL Tools". And I think such an extension would be served well with a more modular architecture and user-interface.

jtagcat commented 4 years ago

I agree, but if a forked advanced version existed, wouldn't it be the same/more maintenance?

The advanced section could have a notice to not expect everything to work all the time, if something was broken. Something like the experimental section on browsers (have been included for many years, yet since the edge case, it's not 'officially supported').

Nevertheless, I think this feature is reasonable, I have opened almost 1k tabs many times (don't ask why), for performance reasons an automatic small delay when opening above n tabs sounds reasonable (even if it's in milliseconds). This prevents one (read: me) from clicking a button and going 'oh no I did something wrong' and waiting 2 minutes to move the cursor on a notebook.

htrinter commented 4 years ago

I agree, but if a forked advanced version existed, wouldn't it be the same/more maintenance?

It would. It is not something I would try to maintain.

This prevents one (read: me) from clicking a button and going 'oh no I did something wrong' and waiting 2 minutes to move the cursor on a notebook.

I think one would have to try, how long the delay would have to be, in order to not overwhelm the system by opening too many new tabs at once. That delay would vary from machine to machine, and would also depend on the complexity of the web pages loaded.

A separate issue is that the code opening the tabs runs in the popup window's UI thread. So the UI freezes, when the thread is busy. And the thread is terminated, if the popup window is closed. The processing task would need to be moved outside of the UI thread. Maybe by executing it in a background script (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background).