|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Custom Solutions How to add Copy script |
How to add Copy script |
How to add
When a user copy text, add link to this.. example: Lorem ipsum, lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum Text copyed. Read more at: http://forum.ucoz.com/forum Looking for Peoples (HadeS)
http://wattmt2.ucoz.com |
mribbiza, you'll need to use JavaScript and client-side scripting for these purposes. We don't provide support on such scripting measures here. You can ask in the Custom Solutions board, however, there is unfortunately rare chance of an answer.
Jack of all trades in development, design, strategy.
Working as a Support Engineer. Been here for 13 years and counting. |
mribbiza, you can join the uCoz Forum in Romanian and get support in your native language if it's easier for you. Our users from there provide support in terms of scripting, sometimes, so feel free to register, search first and ask there if you haven't found an answer yet.
|
mribbiza, Paradox is right, we don't usually provide help with third-party scripts as it is beyond the duties of our support team. But in this case I can give the script you need:
Code <script type="text/javascript"> function addLink() { var body_element = document.getElementsByTagName('body')[0]; var selection; selection = window.getSelection(); var pagelink = "<br /><br /> Source: <a href='"+document.location.href+"'>"+document.location.href+"</a><br />© Jemand.ru"; // 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> It should be pasted before the </head> tag in each templates of the Customize Design section. I'm not active on the forum anymore. Please contact other forum staff.
|
| |||
| |||