Add site link to copied content.


Paste the following code before the tag. The content copied from the pages where the code is placed will be added to the link to the page to which it is pasted.

Paste the following code before the <body> tag. The content copied from the pages where the code is placed will be added to the link to the page to which it is pasted.

<script type="text/javascript">

function addLink() {
//Get the selected text and append the extra info
var selection = window.getSelection(),
pagelink = '<br /><br /> Daha Fazlası: ' + document.location.href,
copytext = selection + pagelink,
newdiv = document.createElement('div');

//hide the newly created container
newdiv.style.position = 'absolute';
newdiv.style.left = '-99999px';

//insert the container, fill it with the extended text, and define the new selection
document.body.appendChild(newdiv);
newdiv.innerHTML = copytext;
selection.selectAllChildren(newdiv);

window.setTimeout(function () {
document.body.removeChild(newdiv);
}, 100);
}

document.addEventListener('copy', addLink);
</script>

Select a section in your webpage and copy (ctrl + c or right click). Then paste the text anywhere you copied.