AlaJS is a simple and light (less than 750B) snippet that adds the source link of a copied text on a web page.
When a user copies a text on a webpage running this snippet and pastes it,
the copied text will contain [Source: website/page-url]
at the end of it.
This will help your SEO because you can get more backlinks and more visitors.
Also, you will be rightfully credited for your work.
You can install it via CDN.
Specific version link
https://cdn.jsdelivr.net/gh/marcocianetti/alajs@1.0.0/lib/index.min.js
Last version link (you should not use this for production):
https://cdn.jsdelivr.net/gh/marcocianetti/alajs/lib/index.min.js
I needed this snippet for my personal website so I decided to make it public. Also, I found someone that is selling these 3 lines of codes for 49$/month and I didn't find it very fair.
As I said is pretty simple, it uses the copy event and edits the clipboard data adding the current page URL.
You're not gonna get that link, of course.
This snippet is not giving you any garantee on keeping your link on copy-pasted text, but when I found a website with this feature for the first time, and I copy-pasted its content, well I just left its source link on that text because I found it ok, "it deserves to be cited".
It's up to your users.
If you want to support me you can offer me a cup of coffee, so I can stay awake fixing (and creating) bugs all night long 🤓☕️