allen505 / save-for-later

A web extension for Chrome/Firefox which saves the tabs in current window for later use.
https://allen505.github.io/save-for-later/contribute
GNU General Public License v3.0
33 stars 11 forks source link

Add to save the highlighted/selected multiple tabs ! #13

Closed dnknn closed 3 years ago

dnknn commented 3 years ago

Save for later referred to as SFL.

Feature request: SFL can support to selected/highlighted multiple tabs with holding Ctrl/Shift !

I don't know if you know this browser basic feature ?

Click to view: What is the selected/highlighted multiple tabs ❓ ![multi-selected-tabs](https://user-images.githubusercontent.com/10995302/108319576-92970480-71fc-11eb-9d39-bf291fdd9a16.gif) 1. You can try to holdding Ctrl/Shift/Ctrl+Shift on the tab-bar and click the non-current tab. 2. At this point, you have selected multiple tabs at the same time. 3. Finally, you can perform batch operations on these selected tabs. e.g. Ctrl+W to batch closes them, F5 to batch reload them ... can also drag them in batches. etc... Example extension : (In fact, many extensions support this feature) - better-onetab https://chrome.google.com/webstore/detail/eookhngofldnbnidjlbkeecljkfpmfpg https://github.com/cnwangjie/better-onetab - SingleFile https://chrome.google.com/webstore/detail/mpiodijhokgodhhofbcjdecpffjipkle http://github.com/gildas-lormeau/SingleFile - TabCopy https://chrome.google.com/webstore/detail/micdllihgoppmejpecmkilggmaagfdmb

I don't know if it is this API-Doc : https://developer.chrome.com/docs/extensions/reference/tabs/#event-onHighlighted


  SFL can only save all tabs in the window , which is very limited!   More often, users only want to save the selected/highlighted tabs with holding Ctrl/Shift (⚠In fact, the current tab is also selected/highlighted , it's just 1)

💡 Implementation plan : see 👇

212_18150240


Whatever, must support this very smart/convenient/perfect feature, as for the UI/GUI is up to you ... ^_^


https://github.com/allen505/save-for-later/issues/12


💪👍 If can be achieved, will be perfect + very smart!

allen505 commented 3 years ago

Hi @dnknn . Thanks for the suggestion.
I wouldn't call this as a "biggest problem" with SFL😀 . This changes should be fairly easy to do. My idea for such a feature is to not add a new button, but just checking if there are tabs selected, and if it is, then only those selected tabs they will be saved, silently.

To implement this feature we need to use the highlighted condition in this line.
Reference: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab

dnknn commented 3 years ago

My idea for such a feature is to not add a new button, but just checking if there are tabs selected, and if it is, then only those selected tabs they will be saved, silently.

💪👍 Yes, Great idea! Be smarter and keep lightweight!

To implement this feature we need to use the highlighted condition in this line.

I don't understand the code 🤦

dnknn commented 3 years ago

@allen505

My idea for such a feature is to not add a new button, but just checking if there are tabs selected, and if it is, then only those selected tabs they will be saved, silently.

So you should add options like this: ⬜ If there are no highlighted tabs, the default behavior is to save the current window ? or the current tab ? , this option can perfectly solve this problem!


If follow your current point of view, then the following :

allen505 commented 3 years ago

I don't understand the code

I added it for a future reference when anyone works on this. I should've made a separate comment.

You bring up a valid issue. So my thinking is that saving a single tab should not be possible at all, not even as a settings option. The reasoning behind it is that saving a single tab is done by using Bookmarks. This extension should be used to save multiple tabs or an entire window.

dnknn commented 3 years ago

saving a single tab should not be possible at all

The reasoning behind it is that saving a single tab is done by using Bookmarks.

This extension should be used to save multiple tabs or an entire window.

Different usage scenarios, The positioning of this extension is to read later , It means to delete it after reading it, and bookmarks are similar to permanent storage.

If you want to save multiple tabs, there are too many ways to implement it even without this extension, and you can even copy the URLs of multiple tabs and save them elsewhere, so I hope you think about it.

In other words, users can use this extension as a temporarily saved scene, temporarily saved, or called temporary storage first

dnknn commented 3 years ago

@allen505 I think a single tab save is also save!

There are also many users who do not display the bookmark-bar (Ctrl+Shift+B), Think about it: Will you save a temporary single tab as a bookmark? Come over and read it like delete it?

The key issue is that bookmarks are administrative in nature, and the extension should be positioned as casual and temporary. Of course, personal opinion...you decide ^_^


In addition, the main reason I chose the extension is that the page is not closed when saving, And lightweight / miniaturization , Very much in line with the name of the extension "Save for later " , i.e. Fast/easy to 💾save, and Fast/easy to 🗑delete.

When need to close the page after save, I will switch to better-onetab extension (Can save single or multiple) or Panic Button extension.

So the positioning/function of each extension is different.

allen505 commented 3 years ago

I still feel that highlight and save for a single tab is not necessary and that it is a rare occurrence. On such occasions you can separate the single tab into a separate window by pulling it out of the current window and saving the newly created window. This way the single tab can be easily created.

allen505 commented 3 years ago

I have implemented this feature in my latest commit. If you wish to test the new version locally please follow these instructions.

dnknn commented 3 years ago

I have implemented this feature in my latest commit

Thank you very much!!!

The test results are very good, in line with expectations, and enough! The single tab is up to you !