erosman / support

Support Location for all my extensions
Mozilla Public License 2.0
167 stars 11 forks source link

ADD option to--Paste clipboard URLs, to open multiple tabs simultaneously. #203

Open sivulabill opened 4 years ago

sivulabill commented 4 years ago

[FoxyTab] Simplify the ability to open multiple windows when each has different URLs/tabs. I echo jerobi's FoxyTab Review (4 months ago), for which I could not find an open issue. Option exists to copy all URLs (in current window) to the clipboard, allowing easy save to a file for documentation/future use. My request: ability to reverse this process. I.e., having copied URLs TO the clipboard, (e.g., from a file created using "copy all URLs", each URL separated by "New Line"), use the clipboard to open one new tab per URL, to-right-of the current tab (or, starting WITH the current tab, if easier to code).

erosman commented 4 years ago

So you want the feature/menu to Open Copied URLs (from Clipboard)? or Open Clipboard URLs

It is not difficult to add the feature.

sivulabill commented 4 years ago

I'm sorry; I do not understand the difference, (?)

Note: I would not be concerned with maintaining clipboard contents, because the clipboard would have been loaded from a still-existing file. OR, the user may have constructed a temporary file (perhaps not even saved), and used the file contents to copy/paste onto the clipboard.

Example #1 (of desired uses): I could maintain a list of URLs for Amazon webpages for each of a bunch of books, where I would periodically load all the webpages, to check for possible short-term-sale prices. (e.g., Amazon does not allow "Honey"/etc. to provide users with long-term Kindle-Book price variance information.)

Example #2: I could save all tabs for a particular window, into a then-saved file, shut down the entire window, and at any later time, "restore" the same window (i.e., with all its previous tabs/URLS, to work on them). (This could serve to allow me to more easily replace the "Firefox multiple-Homepage", if I wanted to have different, but standard, multi-home pages, for different objectives.)

Providing this feature, as I currently understand it, would easily be worth $50 (donation by me). (Maybe not big amount, but significant to me, and I believe this might, possibly, do wonders for my ease of Firefox usage, due to my persistent opening of too many tabs.)

erosman commented 4 years ago

Loading from external file is not possible without user intervention and some work-around.

Saving URLs to extension storage is possible but then it requires a mechanism to edit & update those saved list. This is a very specific feature, and only worth doing if it is popular.

Alternative approaches:

You can save URLs list to a file, edit and update as you wish. Whenever you want to open them, copy those URLs and then a FoxyTab feature to Open Clipboard URLs

Another:

I have another add-on FoxyLink which is able to open links from selection. You can save a list of URLs to a text file. Drag that text file to the browser so it will show the text file with URLs. Select the links (with mousse) on the text file and use FoxyLink -> Open Selected Links

sivulabill commented 3 years ago

1.[FoxyLink FoxyTab] Your last comment, especially under "Another:", makes sense to me now, vs. when I first read it. My count of Tabs (re the Badge) has varied between apx. 255—625 (i.e., MANY tabs open, in many windows).

  1. Weeks ago, I added FoxyLink to my (PortableApps) FireFox. The only indication that it had been added was, I now find FoxylLink under Tools/Add-Ons. At Add-On/Options for FoxyLink, I see no ability to set any of the type options which I had found under FoxyTab. "FoxyLink" does not (as far as I can see) show up at all when accessing the context menu for any tab (even when I left that context menu open for 2+ minutes, in case that would allow enough time for "FoxyLink" to appear).
  2. Your suggestion under "Another:" to access "FoxyLink -> Open Selected Links", seems like a fully adequate solution to MY need! But, I do not know how to access it.
  3. I imagine there is something I do not understand about how to access/use FoxyLink.
  4. Thanks for your attention/response. [My $50 donation offer is still open; this would be a massive help to me.]
erosman commented 3 years ago

FoxyLink Options are available via about:addons -> FoxyLink -> 3dot menu -> Options although there are not many options. It is a simple add-on with no toolbar button/icon and just 1 option. Everything is via context menu. FoxyLink can copy/open or save multiple links.

Example Use in your case:

https://www.example.com/
https://www.google.com/
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/alarms
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserSettings
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browsingData
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/captivePortal
https://news.google.com/articles/asdf
https://hacks.mozilla.org/2020/07/mdn-web-docs-15-years-young/
https://hacks.mozilla.org/2020/07/safely-reviving-shared-memory/
https://hacks.mozilla.org/2020/07/testing-firefox-more-efficiently-with-machine-learning/
https://hacks.mozilla.org/2020/07/adding-prefers-contrast-to-firefox/
https://hacks.mozilla.org/2020/07/securing-gamepad-api/

foxylink

Let me know if that helps.

erosman commented 3 years ago

Additional Possibilities

If there is only 1 set URLs. You can:

Then, whenever you want to open them:

If there are more than 1 set URLs. You can:

Group 2:

https://news.google.com/articles/asdf https://hacks.mozilla.org/2020/07/mdn-web-docs-15-years-young/ https://hacks.mozilla.org/2020/07/safely-reviving-shared-memory/ https://hacks.mozilla.org/2020/07/testing-firefox-more-efficiently-with-machine-learning/ https://hacks.mozilla.org/2020/07/adding-prefers-contrast-to-firefox/ https://hacks.mozilla.org/2020/07/securing-gamepad-api/

sivulabill commented 3 years ago

1.I have examined your last 2 comments, especially the first one. I had prepared a lengthy failure message to send you, because I had given up on making FoxyLink work.

  1. Just before I sent that message, out-of-desperation, I stumbled-upon correct usage of FoxyLink.

What I did not initially understand is, for both 2nd & 3rd lines below, (which I apx. duplicate from paragraphs 6,7,8 of your first comment on Jul-23) the mouse must be in (current browser tab's) "rendered image" screen area.

• Open ... the "urls.text" [file] in a [browser] tab • Select the URL with mouse (all of them or some of them) • Right-click -> FoxyLink -> Open Selected Links.

My earlier-mistake was to assume that, for the third line above, I was to right-click (with the mouse) on ANY TAB of that browser window (i.e., in the "tabs" area of the browser), rather than remaining in the rendered-image-display area (for the browser's current tab).

I'm not sure whether my mistake is due to my not being a developer, or whether your instructions might better have somehow specified mouse-location when performing 3rd line (i.e., in rendered-image-area of current tab), or perhaps both.

  1. For my last-minute experiment, I had the four lines below, in a text file.

file:///k:/b/NameTags/FFP04--01.html https://tvlistings.zap2it.com/?aid=gapzap https://mail.yahoo.com/d/folders/1 about:addons

I opened that .txt file in a browser tab. I selected all four lines (by passing the mouse over them to highlight them). Then, staying in a blank spot within the same rendered-image area, I right-clicked which DID bring up a context menu including FoxyLink.

I selected FoxyLink -> Open Selected Links. This opened the two middle line URLs (as new tabs in current browser window), but not the first nor the 4th line.

  1. Within Firefox, each of the 1st and 4th lines, if placed in the address bar, WILL open a tab. as long as a valid file is named in the first line.) So, do I correctly assume that only http:/https: entries will be processed by FoxyLink?

I did an experiment, which showed that FoxyTab, does SAVE information of the type shown on the 1st and 4th line (e.g., when I executed FoxyTab -> Copy => URLS all Therefore, FoxyTab (apparently) saves things that FoxyLink (apparently) will not restore,

This is not a make-or-break feature.
After all, I suppose it's possible that if FoxyLink tried to restore "whatever contents" might be on a line, it is possible (e.g., for either a hacker, or my sometimes-careless-self) to have something on a line which would cause either Firefox, or the entire computer, to "blow up" or "malfunction seriously".

  1. I am massively fatigued. When I am again more-coherently-wakeful, I will experiment further. But, I believe you have fulfilled my need, so unless usage within the next few days reveals some massive flaw, I expect to make the large, for me, donation. Tentatively, thank you much.

(I don't know whether you're familiar with the Firefox Addon, "FireFox-Portable-2nd-Profile-2.0-App", but I think this may eliminate my perceived need for it)

I may still want to use the Multiple-URL feature available for the Firefox Homepage, since that allows use of non-http(s) addresses, such as first and 4th lines of my example above.

erosman commented 3 years ago

My earlier-mistake was to assume that, for the third line above, I was to right-click (with the mouse) on ANY TAB of that browser window (i.e., in the "tabs" area of the browser), rather than remaining in the rendered-image-display area (for the browser's current tab).

I'm not sure whether my mistake is due to my not being a developer, or whether your instructions

Actually the misunderstanding is due to mixing of FoxyTab & FoxyLink operation concepts.

FoxyTab deals with TAB as a whole and the right-click menu appears by clicking the Tab (on top). (There are few extensions that have a content-menu on the TAB.)

FoxyLink (like many extensions) deals with content of the tab i.e. the page. Therefore the context menu appears when clicking on the page.

Open ... the "urls.text" [file] in a [browser] tab

Sorry if my answer wasn't clear enough. I updated it for future visitors.

So, do I correctly assume that only http:/https: entries will be processed by FoxyLink?

Correct. I had set it to look for http/https/ftp/ftps type links. However, it is not a problem to add support for file: or about: but there hasn't been any request for it. If you add a request, I can add it to the next upgrade of FoxyLink (TBH, I haven not worked on FoxyLink for a long time)

Therefore, FoxyTab (apparently) saves things that FoxyLink (apparently) will not restore,

FoxyTab recognises any URL that is opened by the browser tab and the COPY function copies them to Clipboard.

FoxyLink does not grab them from clipboard. It is possible to add a feature to do that, if there is a demand but you have to bear in mind that Clipboard is often overwritten so those copied links will be lost. It is not an optimum choice.

Let me know if there are any issues or questions.

sivulabill commented 3 years ago

I ran my "first test" of FoxyTab/FoxyLink (using your recommended three steps). My first (large-scale) test was: 1) I used FoxyTab to save ALL Title&URL from one many-tabs Firefox window; 2) I pasted the results into a file; 3) I opened a new Firefox window; 4) I opened the saved file (from step #2), used my mouse to select the entire file contents; and 5) I right-clicked -> FoxyLink -> Open Saved Links.

The one annoying result was that the tabs were in the reverse sequence, left-to-right, as they had been when I originally saved them. (It could be that when my on-edge-emotions calm down, perhaps by taking a break for a day, that a simple solution will be obvious.)

I will be searching for, and wondering if you happen to KNOW of, a free Windows software utility which, when fed the name of a text file, will entirely-reverse the sequence of lines (but not the contents of any line) either into the original file or perhaps creating a new file.
Or perhaps, some simple (i.e., SMALL-#-of-uncomplicated steps) manual process to achieve the same result.

(It HAS occurred to me that I could approximately double the # of original steps, by taking the first-created URLs-file, and use the first-created file to create a second-created file that would reverse the reverse, in order to achieve, when FoxyLinked, the original sequence of tabs, but this would be time-consuming if needed often.)

erosman commented 3 years ago

The one annoying result was that the tabs were in the reverse sequence, left-to-right,

I see .... I tested and FoxyLink does that. I have changed that behaviour and it will be in the next upgrades.

If you can wait I will release a fixed version and include file: & about: processing.

sivulabill commented 3 years ago

I guess I can use it (as is) for one (not practical to do it, before your exposition ) premium chore, even before the fix. Also, as long as I perform the extra step to reverse it a 2nd time, I can use it now for everything else (but will be awaiting the fix). Unfortunately, I do not understand your reference to "file:" and "about:" processing. Perhaps you could explain that, but feel free to wait until they appear in the fix. (Partial donation before the fix.)

sivulabill commented 3 years ago

I guess my only previous donations (re Firefox Addons) have been when an AddOn (only one that I responded to, I think) solicited me for one (and apparently it then "walked me through" the process of using PayPal to do so). How do I do it (to your project, not to GitHub). (And would it be easier to wait until the "fix is done" and I'm ready for the entire donation?)

erosman commented 3 years ago

I guess I can use it (as is)

I have started updating the code and it should be ready soon.

I do not understand your reference to "file:" and "about:" processing

Referee to FoxyLink not grabbing about:addons or file:///k:/b/NameTags/FFP04--01.html

I guess my only previous donations (re Firefox Addons) have been when an AddOn (only one that I responded to, I think) solicited me for one (and apparently it then "walked me through" the process of using PayPal to do so). How do I do it (to your project, not to GitHub). (And would it be easier to wait until the "fix is done" and I'm ready for the entire donation?)

I have never set up a donation process for my add-ons. In case of necessity, I will have to ask a friend to accept it on my behalf. I suggest waiting until the next version of FoxyLink comes out.

erosman commented 3 years ago

Quick Update

FoxyLink now picks up about:... & file:///...... links for copy/paste/save, however, Firefox API prevents opening them.

tabs.create()

For security reasons, in Firefox, this may not be a privileged URL. So passing any of the following URLs will fail:

  • chrome: URLs
  • javascript: URLs
  • data: URLs
  • file: URLs (i.e., files on the filesystem. However, to use a file packaged inside the extension, see below)
  • privileged about: URLs (for example, about:config, about:addons, about:debugging). Non-privileged URLs (e.g., about:blank) are allowed.
  • The New Tab page (about:newtab) can be opened if no value for URL is provided.
erosman commented 3 years ago

FoxyLink 1.3 is available. Please check the included Help (via context-menu Options)

touwys commented 3 years ago

If I may, I would like to express my view on the subject of opening multiple tabs:

The current process proposed to open multiple tabs, would probably be better served by trimming down on the number of steps ultimately needed to open multiple tabs. Also, instead of the two extensions needed i.e. FoxyTab & FoxyLink, would it not be more useful to incorporate desirable function in FoxyTab directly?

The following extension is serving well to open multiple tabs with. If something similar in function could be merged with FoxyTab, it is sure to be a hit; all the while it can gain in functionality by adding more sorting options (e.g. reverse sort), and an adjustable time delay with which to set the required time delay between the opening of subsequent tabs:

Open Multiple URLs

erosman commented 3 years ago

@touwys FoxyTab deals with tabs (and not its content where links are) while FoxyLink deals with links.

FoxyLink has the option to open/save/grab links.

touwys commented 3 years ago

Thank you, I realise that, because I already deploy both FoxyLink and FoxyTab. :)

adostrom commented 1 year ago

I just found this GitHub issue/feature request, so I'm late to add to the request. I understand that FoxyLink will work, and I thank you for that. I echo the responses that ask for tab creation from a list to be added to FoxyTabs - it is hard to find this discussion and learn that there is a workaround.

As a use-case example I refer you to the "Open Lilst" extension for Chrome - when you click on that extension it opens a small window - you paste the list of URLs into that window and click the confirmation - it then creates the tabs and loads the URLs.

Thanks! Andy

erosman commented 1 year ago

Believe it or not, there are people who have commented that FoxyTab has far too many functions. :smile:

Lets see how popular the feature request is.

buckedup commented 1 year ago

bump! If you can copy urls it only makes sense that you could paste them too!