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

4.1.3 Breaks Drag-n-Drop of Links #110

Closed Copyrites closed 4 years ago

Copyrites commented 4 years ago

Bug Description: With CleanLinks enabled using default settings, drag-and-drop of links from a web page no longer works.

I'm not sure when this bug first started, its been happening to me for a few days now, just thought I needed to restart windows-manager/X11. But when I finally restarted, it was still broken.

OS: Ubuntu 19.10 Browser: Firefox 74.0.1 64-bit CleanLinks version 4.1.3 Configuration: Fresh profile and CleanLinks is the only extension.

Steps to reproduce:

  1. Load any page, for example https://github.com/Cimbali/CleanLinks

  2. Left-click and drag on any link in the page - nothing happens

  3. Click the "Disable the extension for this tab" button on the CleanLinks drop-down widget

  4. Reload page

  5. Left-click and drag on the same link - get normal drag-and-drop behavior

Cimbali commented 4 years ago

Interesting. If it's been a few days it probably also happens with 4.1.2 (as the newer version was released yesterday). We don't modify drag and drop javascript events though, only mousedown / click / mouseup.

So the broken functionality is dragging a link and dropping it in for example the address bar.

Thanks for reporting, I'll look into it.

Cimbali commented 4 years ago

Turns out we were pre-emptively suppressing mousedown events (aka start of a click) even when not needed. Now we only do it when:

Shipping this fix in v4.1.4 right away.


Now when the 2 conditions above are met and only then (e.g. on google results) the dragging of links is still broken.

Here are some alternatives:

  1. Right click > Copy clean link
  2. Add a domain-specific rule.

    For the example of google search results:

    • domain: ww.google.*
    • path: /search
    • tick Allow javascript to modify links
    • click Save rule

    Beware that when you drag the link from the google results page, you won’t be dragging the clean link that you see but the modified https://www.google.com/url?url=…. We will still clean it at the time of loading, but later on in the process, and some tracking may have happened in between.

  3. Add a global rule

    Go to the *.* rule, tick Allow javascript to modify links and click Save rule. The same comments as above apply.