Cimbali / CleanLinks

Converts obfuscated/nested links to genuine clean links.
https://addons.mozilla.org/en-GB/firefox/addon/clean-links-webext/
Mozilla Public License 2.0
76 stars 2 forks source link

Original and destination links are merged when copying to the clipboard #43

Closed birdie-github closed 4 years ago

birdie-github commented 6 years ago

In the log window I see

$Source_URL
→ $Cleaned_URL

However when I copy it to the clipboard, I get

$Source_URL$Cleaned_URL

which is not exactly readable.

If you're OK with that then close this bug report as invalid.

Cimbali commented 6 years ago

I have a newline between $source_url and $cleaned_url. If you do not have it, please report your firefox version, platform, etc. For example, maybe on Windows \n\r should be the separator, instead of just \n.

If you have any suggestion for a better separator than a new line between both URLs, do not hesitate.

birdie-github commented 6 years ago

This is 100% reproducible under Linux / Firefox 63 beta 9 ( https://ftp.mozilla.org/pub/firefox/releases/63.0b9/linux-x86_64/en-US/ ).

Cimbali commented 6 years ago

So missing newline on Linux 64 bits with ff 63 beta 9.

birdie-github commented 6 years ago

Yep.

I wonder if using " → " (space right arrow space) is sufficient. It's not such a common symbol for URLs - in fact I'm not sure it can be used as is. And spaces in URL must be escaped anyways ;-)

Cimbali commented 6 years ago

Is the 64 bits Linux a virtual machine inside a Windows machine? If so, do you look at the clipboard inside or outside of the virtual machine?

birdie-github commented 6 years ago

Nope, I'm running on real hardware.

Cimbali commented 4 years ago

I have the newline on Firefox 72.0. Waiting to test other environments.

Cimbali commented 4 years ago

Also works on FF 68 and 72 on Linux desktops, FF 64 on Windows, FF 68 on Android. Closing until we can reproduce somewhere.

birdie-github commented 4 years ago

I can reproduce it in Firefox 74 under Fedora 31/XFCE right now.

https://www.imdb.com/title/tt2527338/?ref_=rt_li_tthttps://www.imdb.com/title/tt2527338/

Cimbali commented 4 years ago

How are you copying?

birdie-github commented 4 years ago
  1. Click the extension icon

  2. Click the log item you're interested in to expand it

  3. Use mouse to make a selection

  4. Ctrl + C

  5. Ctrl + V here

Just for fun I've just clicked Ctrl + A instead in the extension pop-up window and now I'm doing Ctrl + V:


Clean Links v4.1.2 — Enabled

Filter link type
Filter cleaning action

https://www.imdb.com/title/tt2527338/?ref_=rt_li_tthttps://www.imdb.com/title/tt2527338/

I've got no apps interfering with the clipboard.

Cimbali commented 4 years ago

Alright, can you try your steps without step 3? So:

  1. Click the extension icon
  2. Click the log item you're interested in to expand it
  3. Ctrl + C
  4. Ctrl + V here
birdie-github commented 4 years ago

Ctrl+C does nothing in this case. Nothing gets copied to the clipboard.

Cimbali commented 4 years ago

Ok, that’s really how it should work though. So the 'copy' event does not get triggered for some reason

https://github.com/Cimbali/CleanLinks/blob/d57cde1f41a3d10c3444c0bb11154b756d3a01a0/addon/pages/popup.js#L238-L248

Cimbali commented 4 years ago

So does the live example on this MDN page work for you?

birdie-github commented 4 years ago

If I understand correctly pressing Ctrl + C while this page is open should copy "Try copying text from this box..." to the clipboard, right?

This doesn't happen. I even placed the cursor in the middle of the text - no dice.

At the end of this MDL page there's this warning:

"Clipboard API and events Working Draft" - this might not have been implemented yet.

Cimbali commented 4 years ago

No you have to select some text in “Try copying text from this box” box. When you copy it, your clipboard should actually contain the selected text but in upper case.

birdie-github commented 4 years ago

Nope, it's copied as is without case conversion.

Cimbali commented 4 years ago

Does the “copy clean links” work, from the context menu? That’s using another way of interacting with the clipboard.

birdie-github commented 4 years ago

Does the “copy clean links” work, from the context menu? That’s using another way of interacting with the clipboard.

Yes, it works perfectly.

Cimbali commented 4 years ago

Good, then I’ll make a copy button in the popup with that functionality. That will also be useful for android interfaces.

Cimbali commented 4 years ago

Closed by 1f8eccd (with wrong issue number in message…)