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
245 stars 56 forks source link

Open multiple eMule links? #55

Open Darkmaster006 opened 2 years ago

Darkmaster006 commented 2 years ago

Hello there! This add-on is amazing, thank you very much for your work. Lately, I've been trying to open multiple eMule links at once. Their format is: ed2k://|file|Batman%200003%20(Novaro)%20-%20DC%20195%20xE.Benedetto.cbr|10994972|A583FB1F303CC4354A1C41F877E30A5F|h=FKZ53HH2ANXR3OIRGSM7FCCB62ZWLRLJ|/ ed2k://|file|Batman%200004%20(Novaro)%20-%20Batman%2077%20xE.Benedettonet.cbr|12135758|2EB20B7D41EFF8C10241972940C4962F|h=NUXU6WLEG4JDRAF5JQEYNLGSYCR5JW2L|/

These are two ed2k links, when you open them in your browser, the files get added to eMule. But the links are like that, they are not http links. So that when trying to open them with this extension, you get, in this case for example, two tabs with: http://ed2k//|file|Batman%200002%20(Novaro)%20-%20Batman%2076%20xE.Benedetto.cbr|11167860|74EFB900FE82C8899825D09F44A45A34|h=75S6IHI7YHIZLJ7LFBRT4PLC6FJBNORO|/ http://ed2k//|file|Batman%200003%20(Novaro)%20-%20DC%20195%20xE.Benedetto.cbr|10994972|A583FB1F303CC4354A1C41F877E30A5F|h=FKZ53HH2ANXR3OIRGSM7FCCB62ZWLRLJ|/

Which, of course, gives you 'server not found' and they are not added to eMule. Is there any way to have the add-on open these links as they are, without adding the http:// which I guess is what breaks them? This feature would be very useful. Thank you very much!

htrinter commented 2 years ago

At the moment there is an allowlist of URL schemes that is used to determine if http scheme is prepended. The scheme could be added there. Although it probably would be best to refactor the code in order to make detection more flexible, without the need of an allowlist. Either way the extension code has to be changed. I will put it on the todo list, there is no ETA though. Of course I am open to pull requests implementing the feature, if somebody else wants to get to it sooner.

Darkmaster006 commented 2 years ago

At the moment there is an allowlist of URL schemes that is used to determine if http scheme is prepended. The scheme could be added there. Although it probably would be best to refactor the code in order to make detection more flexible, without the need of an allowlist. Either way the extension code has to be changed. I will put it on the todo list, there is no ETA though. Of course I am open to pull requests implementing the feature, if somebody else wants to get to it sooner.

Thank you. I'm not very versed, but I'll look at the code anyways. Either way, I'm fine with waiting, hopefully you can implement it at your pace. Thank you very much for the answer and all your work!