N
nicorto
Lambda
genial :encouragement::drunk:Insertar CODE, HTML o PHP:<script type="text/javascript"> function addLink() { var body_element = document.getElementsByTagName('body')[0]; var selection; selection = window.getSelection(); var pagelink = "<br /><br /> Artículo sustraído de: <a href='"+document.location.href+"' href='"+document.title+"'>"+document.title+"</a>"; // Mensaje que aparecerá al copiar var copytext = selection + pagelink; var newdiv = document.createElement('div'); newdiv.style.position='absolute'; newdiv.style.left='-99999px'; body_element.appendChild(newdiv); newdiv.innerHTML = copytext; selection.selectAllChildren(newdiv); window.setTimeout(function() { body_element.removeChild(newdiv); },0); } document.oncopy = addLink; </script>
Aquí con el anchor y el title dinámico de acuerdo al título de la página 🙂
Gracias y saludos