Version 1.3
Affiliate urls often looks like a mess, similar to below.
http://affiliate-url.com/?ad=123122&campaign=123&id=213&url=beautiful-url.com
This url looks better.
http://beautiful-url.com
In short
- Inspired by Google. Google does the same thing to their links.
- Dependency free
- Only 1KB
- Uses ES6 version of javascript
- Tested in Chrome, Firefox and Edge
Put the script above </body>
.
<script src="assets/js/dist/script.min.js"></script>
<a href="http://affiliate-url.com/long-and-not-nice" data-href="http://beautiful-url.com">Link text</a>
Hover the url of the link. It should show the beautiful url, instead of the ugly affiliate url.
When you click the link, it should switch to the affiliate url on mousedown. To prevent a click when testing, you can drag the link instead. After that, hover it and you should see the affiliate url instead.
Donate to DevoneraAB if you want.
MIT