Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copypaste public gateway URL from location bar #24

Closed
sonatagreen opened this issue Sep 28, 2015 · 3 comments
Closed

Copypaste public gateway URL from location bar #24

sonatagreen opened this issue Sep 28, 2015 · 3 comments
Labels
help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature status/blocked/missing-api Blocked by missing API

Comments

@sonatagreen
Copy link
Contributor

I'm accustomed to copying URLs with Ctrl-L Ctrl-C. This gives me the custom gateway URL (http://localhost:8080/etcetera), rather than the public gateway URL (https://ipfs.io/etcetera).

If possible, it would be nice to be able to copy the public gateway URL from the location bar. Ideally, the location bar should still visually display the custom gateway URL (or, optionally, the canonical address), similarly to how it normally displays e.g. "example.com" but copies as "http://example.com/".

@lidel lidel added the UX label Sep 28, 2015
@lidel lidel self-assigned this Sep 28, 2015
@lidel
Copy link
Member

lidel commented Sep 28, 2015

I use ctrl+l&ctrl+c too, good idea! 👍

Of course the end result should be configurable via Preferences screen:

  • copy URL to a public gateway
  • copy canonical IPFS path
  • do nothing, copy URL as is

I'll look into this in a spare moment (support in old/new Addon SDKs).

For now you can a use context menu (under right click on a page loaded via custom gateway) items.

@lidel lidel added the kind/enhancement A net-new feature or improvement to an existing feature label Jan 6, 2016
@lidel lidel added the help wanted Seeking public contribution on this issue label Jan 17, 2016
@lidel lidel removed their assignment Feb 3, 2016
@lidel lidel added the status/blocked/missing-api Blocked by missing API label Aug 6, 2016
@lidel
Copy link
Member

lidel commented Mar 26, 2017

Two years later 👀 WebExtensions landed (see #20 for more details).

I revisited this issue and it is not possible to override CTRL+C in Location Bar context.

What we can do, is to use WebExtensions/manifest.json/commands API and define a new keyboard shortcut that will place public gateway URL in user's clipboard.
It would be one step, without the need for CTRL+L to focus Location Bar.

I am thinking about ALT+C or ALT+SHIFT+C,
but I need to check if it does not impact the way some diacritics are created (eg. "ć" in Polish).

@lidel
Copy link
Member

lidel commented Jul 22, 2017

I tried to address this, but it is not possible to implement it in WebExtension.

Unfortunately keyboard shortcuts are sent as commands to a background page and MDN states that:

you can write to the clipboard like this in all execution contexts except background pages. In Firefox you can't select text or focus an input field in background pages, so you can't write to the clipboard from a background page.

This means the only working cross-browser and future-proof way to copy "canonical" and "public" URLs is via Browser Action button:

2017-07-22-170243_1721x1421_scrot

@lidel lidel closed this as completed Jul 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature status/blocked/missing-api Blocked by missing API
Projects
None yet
Development

No branches or pull requests

2 participants