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

Clean URLs in youtube description #135

Closed madpipeline closed 3 years ago

madpipeline commented 3 years ago

I've tried looking into creating my own rule, but don't understand how the regex is to be formed.

Example page: https://www.youtube.com/watch?v=dV7csY0mRgM

In it's description there are several links, all of them formed like this:

https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbmoxbGoyTG80MFZMdXdHOGc3OXliVi1zMWItd3xBQ3Jtc0trWElFNTBlQjJBODJPYkQwdUlOSkZZUGh0cXdPakg1ZDViektvdm4tYXpMUDFzRFpiQ0FWTWczQ2pEYlNqbmNRUkdPV29jN3JHeXhub0xIaTQ4eGFYN2UtbDljREFvWW1McG5vS1k4SG5KODBxYjl3NA&q=https%3A%2F%2Fwww.recorder.ro%E2%80%8B%E2%80%8B

All these links should be cleaned and shown like this:

https://www.recorder.ro​​

I've tried looking through the existing rules and I think groups are used, but I'm not sure how.

Some examples in the wiki would be useful, but also this rule could be part of the default rules.

Cimbali commented 3 years ago

They seem to be cleaned automatically − are you sure it’s not the case ? In that case you might have whitelisted something (maybe accidentally).

Can you confirm the link is not cleaned ?

madpipeline commented 3 years ago

Ok, I think I misunderstood how this extension works.

If I open the youtube page, and hover over the links in the description, I'm still shown the tracking link.

However, if I click on the link, I see the it doesn't take me to the tracking link , but takes me directly to the target link.

This is slightly confusing. Is this the expected behavior?

Cimbali commented 3 years ago

Yes, that’s the expected behaviour ! It allows to:

Cimbali commented 3 years ago

By the way @madpipeline you can access the clean link without opening it by right-clicking the link and using « Copy Clean Link » (if the feature « copy clean links from the context menu » is enabled).

madpipeline commented 3 years ago

Thank you.