function addLink() {
var element_body = document.getElementsByTagName('body')[0];
var selection;
selection = window.getSelection();
var linkpage = "
Источник: "+document.location.href+"";
var copytext = selection + linkpage;
var divnew = document.createElement('div');
divnew.style.position='absolute';
divnew.style.left='-99999px';
element_body.appendChild(divnew);
divnew.innerHTML = copytext;
selection.selectAllChildren(divnew);
window.setTimeout(function() {
element_body.removeChild(divnew);
},0);
}
document.oncopy = addLink;