jingyu9575 / multithreaded-download-manager

Download manager extension for Firefox with multithreading support
Mozilla Public License 2.0
265 stars 36 forks source link

Mult Link selection 'n theme #65

Closed ghost closed 5 years ago

ghost commented 5 years ago

Please add multi links selection to context menu function, if I select 10 link and go to context menu, add 10 links together,

if possible add a dark theme,

setting to open new download window as popup

thanks

Onurtag commented 5 years ago

You can use this Dark Theme as your custom CSS if you want: https://gist.github.com/Onurtag/1ea462f330a8cc26d4b72d3023966f65

To the Developer: Feel free to add this as a dark theme option. No need to credit me.

edit: I updated the CSS and now it should be way better.

jingyu9575 commented 5 years ago

add multi links selection to context menu function

Are you suggesting a feature to select a paragraph, and then right-click to download all links in that paragraph?

A limitation is that one extension can only add one context menu, and if more than one is proposed, they will be collapsed into a submenu. Not sure if it is possible to workaround this.

setting to open new download window as popup

It is possible to open the panel in a new window, by right-clicking the toolbar icon.


@Onurtag Thank you! I'll need to test it again though, as there are some changes in the new version in development.

ghost commented 5 years ago

@Onurtag thanks

@jingyu9575 when I highlight 3 links in an page, using context menu, the plugin download only one, ideal is download the 3 selected (highlighted) links, if need submenu I think this is no problem for any user, because today MDM is an One Link Downloader, it can be an Multi Link Downloader, like Downthenall.

About window in popup, I say an setting to open not the main window, but the "New Download Prompt" in the button popup

Another good feature can be add an option to add multi links from clipboard,

jingyu9575 commented 5 years ago

when I highlight 3 links in an page, using context menu, the plugin download only one, ideal is download the 3 selected (highlighted) links

Understood. I'll see how to implement it.

the "New Download Prompt" in the button popup

Firefox does not allow opening the button popup without clicking on extension UI, to prevent "abusive and intrusive practices".

add multi links from clipboard

The next verison v2 will have this feature:

图片

ghost commented 5 years ago

very good, thank you

jingyu9575 commented 5 years ago

So this is how I implement the multi-link selection feature in v2 (still under development):

image

After clicking the menu item, the link picker shows and the selected links are automatically checked.

The menu items have to be collapsed into a submenu due to the limitation of Firefox. Also, I've seen some cases where the menu does not show if an image is at the beginning of the selection. I think it is Firefox's Bug 1463002, although it is closed because the Firefox developer cannot reproduce it.

ghost commented 5 years ago

about multi link selection, is exactly this I said, very good, about issues when have images, this is true, I know this issue, if you want, look the "FoxyLink" extension, seem this extension have an better link multi selection when have images, maybe his code can help.

jingyu9575 commented 5 years ago

FoxyLink is showing the selection's menu on unselected links too, so if this extension uses the same method, there will always be 2 menu items when a link is right-clicked and they always have to be collapsed. I'd say the single link menu is used more frequently, and it should not be hidden in the submenu to workaround a Firefox bug.

Onurtag commented 5 years ago

That image above looks pretty awesome.
It might be possible to keep it as a single button if it is possible to do something like:

It can also be an option to show the above popup to always show even if you didn't select anything.


As for dark mode option;
When you are ready to release the new version, I can fix the above css to make it work with the new version on an unreleased build. (if you need a helping hand)

jingyu9575 commented 5 years ago

@Onurtag

If there are any links selected, show the above popup

I think it is a good idea. The menus have been merged in this way. The bug mentioned above cannot be solved though.

fix the above css to make it work with the new version

Thank you, I'd appreciate it if you can update the CSS for v2.

The repo has been updated with the v2 code, and the extension XPI is here. It is unsigned and can only be installed temporarily, or in Developer Edition/Nightly/Unbranded build after disabling mandatory signing. Since there are changes in the connection APIs, I'd test it for some more time before releasing to Mozilla Add-ons.

I've tried your current CSS and the main issue is the tab control whose background color is not overridden. Also, are the margins specifically for the dark theme, or should they be integrated into the base CSS?

Onurtag commented 5 years ago

This is what I made for now. The margins were just extras, theres nothing to add to the main .css files. https://gist.github.com/Onurtag/21fd4ada8bb583c3f2c0ad32dcb21e4d
I'll take another look this sunday to confirm that its good enough.

I'm not really a designer so if you have better ideas for colors etc. go ahead and fix them up before adding it in as an option.

ghost commented 5 years ago

@jingyu9575, I say about Foxy Link not because context menu, I say about Foxy Link because "seem" which this plugin work well when an image is at the beginning of the selection, or not?

jingyu9575 commented 5 years ago

@Onurtag: The CSS has been included as a theme option. You can edit the source file and create a pull request if you want changes. (The symbols {}; are not required in that file.)


@mrochaaa: FoxyLink is also affected by the same problem; the "Open Selected links" menu item does not show when the bug happens. The bug seems to happen only when there is an image just before the selection, but not inside the selection.

图片