Many of us have blogs, online stores, news sites etc ... It’s clear that we try to publish original content, but what happens after the content appears on the Internet, it is viewed of course, and if it’s interesting, users sometimes exchange a link to a page with content. New transitions to the desired page and we are very good, but what if our excellent text was simply copied and dropped off at Skype / Skype \ mail - our text is gone, but there is no transition :(.
- Write an event handler for CTRL + C, "Copy", will have to work with the clipboard, and it does not work with it in modern browsers. - Use crutches in the form of flash. Also not very, +1 dependency, and in version 10 to copy to the buffer you need to click on the flash drive interface. - And what if we look at what the user selects with the cursor and carefully slip our link, hehe heh, I wrote this article to implement this method.
It all works like a jQuery plugin.
Create an element based on the initialization of the plug-in, which we will slip to copy-paste.