CINXE.COM

Add a Copyright Notice to Copied Text | bavotasan.com

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" dir="ltr" lang="en-US"> <head><script type="text/javascript" src="/_static/js/bundle-playback.js?v=HxkREWBo" charset="utf-8"></script> <script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/","20101120003401","https://web.archive.org/","web","/_static/", "1290213241"); </script> <link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" /> <link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="googlebot" content="index,archive,follow,noodp"/> <meta name="robots" content="all,index,follow"/> <meta name="msnbot" content="all,index,follow"/> <meta name="description" content="I was checking out the CBC website and I noticed that if you copy and paste any text from the site a reference link appears at the bottom, indicating the s..."/> <meta name="keywords" content="clipboard,copy,copyright,getSelection,Javascript,paste,text,"/> <title>Add a Copyright Notice to Copied Text | bavotasan.com</title> <link rel="stylesheet" href="https://web.archive.org/web/20101120003401cs_/http://bavotasan.com/wp-content/themes/bavotasan-2010/style.css?ver=1.0.8" type="text/css" media="screen"/> <link rel="shortcut icon" href="https://web.archive.org/web/20101120003401im_/http://bavotasan.com/favicon.ico"/> <link rel="pingback" href="http://bavotasan.com/xmlrpc.php"/> <link rel="alternate" type="application/rss+xml" title="bavotasan.com 禄 Feed" href="https://web.archive.org/web/20101120003401/http://bavotasan.com/feed/"/> <link rel="alternate" type="application/rss+xml" title="bavotasan.com 禄 Comments Feed" href="https://web.archive.org/web/20101120003401/http://bavotasan.com/comments/feed/"/> <link rel="alternate" type="application/rss+xml" title="bavotasan.com 禄 Add a Copyright Notice to Copied Text Comments Feed" href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/feed/"/> <script type="text/javascript" src="https://web.archive.org/web/20101120003401js_/http://bavotasan.com/wp-includes/js/jquery/jquery.js?ver=1.4.2"></script> <link rel="index" title="bavotasan.com" href="http://bavotasan.com/"/> <link rel="start" title="Removing Images from a WordPress Post: Redux" href="http://bavotasan.com/tutorials/removing-images-from-a-wordpress-post/"/> <link rel="prev" title="Meta Descriptions for WordPress" href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/meta-descriptions-wordpress/"/> <link rel="next" title="My First Vanilla Plugin" href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/my-first-vanilla-plugin/"/> <link rel="canonical" href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/"/> <link rel="shortlink" href="https://web.archive.org/web/20101120003401/http://bit.ly/c1KT0z"/> <script type="text/javascript" src="https://web.archive.org/web/20101120003401js_/http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script> <meta property="fb:page_id" content="137456822940271"/> <meta property="fb:admins" content="586505548"/> <meta property="og:site_name" content="bavotasan.com"/> <meta property="og:title" content="Add a Copyright Notice to Copied Text"/> <meta property="og:description" content="I was checking out the CBC website and I noticed that if you copy and paste any text from the site a reference link appears at the bottom, indicating the source. I thought that was kind of neat and tried to figure out how to do it. Turns out, they use a service called Tynt. [...]"/> <meta property="og:type" content="article"/> <meta property="og:image" content="https://web.archive.org/web/20101120003401im_/http://bavotasan.com/wp-content/uploads/2010/11/copyright1.jpg"/> </head> <body class="single single-post postid-2943"> <div id="bodywrap"> <!-- BuySellAds.com Ad Code --> <script type="text/javascript"> (function(){ var bsa = document.createElement('script'); bsa.type = 'text/javascript'; bsa.async = true; bsa.src = '//web.archive.org/web/20101120003401/http://s3.buysellads.com/ac/bsa.js'; (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa); })(); </script> <!-- END BuySellAds.com Ad Code --> <!-- begin header --> <div id="header"> <div id="topmenu" class="menu-top-menu-container"><ul id="menu-top-menu" class="menu"><li id="menu-item-2254" class="menu-item menu-item-type-custom menu-item-2254"><a href="https://web.archive.org/web/20101120003401/http://themes.bavotasan.com/">Themes by bavotasan.com</a></li> <li id="menu-item-2255" class="menu-item menu-item-type-custom menu-item-2255"><a href="https://web.archive.org/web/20101120003401/http://themes.bavotasan.com/support/">Support Forum</a></li> <li id="menu-item-2259" class="menu-item menu-item-type-custom menu-item-2259"><a href="https://web.archive.org/web/20101120003401/http://themes.bavotasan.com/affiliates">Affiliates</a></li> <li id="menu-item-2256" class="menu-item menu-item-type-post_type menu-item-2256"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/about/">About</a></li> <li id="menu-item-2257" class="menu-item menu-item-type-post_type menu-item-2257"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/services/">Services</a></li> <li id="menu-item-2258" class="menu-item menu-item-type-post_type menu-item-2258"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/contact/">Contact</a></li> </ul></div> <div id="title"> <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/"> <img src="https://web.archive.org/web/20101120003401im_/http://bavotasan.com/wp-content/themes/bavotasan-2010/images/bavotasan.png" alt="bavotasan.com" width="400" height="70"/> <span id="desc"></span></a> </div> <div id="follow"> <span></span> <a href="https://web.archive.org/web/20101120003401/http://twitter.com/bavotasan" class="twitter"></a> <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/feed/" class="rss"></a> </div> <div id="navigation" class="menu-main-menu-container"> <ul id="menu-main-menu" class="menu"> <li id="menu-item-2264"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/"><span></span>Home</a></li> <li id="menu-item-2266"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/category/articles/"><span></span>Articles</a></li> <li id="menu-item-2265" class="current-menu-item"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/category/tutorials/"><span></span>Tutorials</a></li> <li id="menu-item-2267"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/category/downloads/"><span></span>Downloads</a></li> </ul> </div> </div> <!-- end header --> <div id="mainwrapper"> <div id="leftcontent"> <div class="posttop"> <div class="thedate"><div class="month">Nov</div><div class="day">01</div><div class="year">2010</div></div> <h1>Add a Copyright Notice to Copied Text</h1> <br class="clear"/> <p>I was checking out the <a href="https://web.archive.org/web/20101120003401/http://cbc.ca/">CBC</a> website and I noticed that if you copy and paste any text from the site a reference link appears at the bottom, indicating the source. I thought that was kind of neat and tried to figure out how to do it. Turns out, they use a service called <a href="https://web.archive.org/web/20101120003401/http://www.tynt.com/">Tynt</a>. That&#8217;s cool and all, but I wanted to see if I could make it happen using JavaScript. All I needed my function to do was grab the copied selection, tack on a copyright notice and then add the two to the clipboard. </p> <p>It took a lot of messing around and I was finally able to put something together that worked in most browsers. Sorry IE people, this one won&#8217;t work for you, though if anyone figures out a fix for IE let me know. Then the function will work for all major browsers.</p> <p>Here is the JavaScript:</p> <div class="wp_syntax"><table border="0" cellpadding="0" cellspacing="0"><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> <span style="color: #003366; font-weight: bold;">function</span> addLink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #003366; font-weight: bold;">var</span> body_element <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #003366; font-weight: bold;">var</span> selection<span style="color: #339933;">;</span> selection <span style="color: #339933;">=</span> window.<span style="color: #660066;">getSelection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #003366; font-weight: bold;">var</span> pagelink <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;br /&gt;&lt;br /&gt; Read more at: &lt;a href='&quot;</span><span style="color: #339933;">+</span>document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;&quot;</span><span style="color: #339933;">+</span>document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt;&lt;br /&gt;Copyright &amp;copy; c.bavota&quot;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// change this if you want</span> <span style="color: #003366; font-weight: bold;">var</span> copytext <span style="color: #339933;">=</span> selection <span style="color: #339933;">+</span> pagelink<span style="color: #339933;">;</span> <span style="color: #003366; font-weight: bold;">var</span> newdiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> newdiv.<span style="color: #660066;">style</span>.<span style="color: #660066;">position</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'absolute'</span><span style="color: #339933;">;</span> newdiv.<span style="color: #660066;">style</span>.<span style="color: #660066;">left</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'-99999px'</span><span style="color: #339933;">;</span> body_element.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> newdiv.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> copytext<span style="color: #339933;">;</span> selection.<span style="color: #660066;">selectAllChildren</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> window.<span style="color: #660066;">setTimeout</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> body_element.<span style="color: #660066;">removeChild</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> document.<span style="color: #660066;">oncopy</span> <span style="color: #339933;">=</span> addLink<span style="color: #339933;">;</span> <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div> <p>Just add this between your page&#8217;s head tags, and change the copyright notice to whatever you want. </p> <h3>Demo</h3> <p>To test it out, copy something from the paragraph below and paste it into your favorite text editor.</p> <div id="testp" style="padding: 10px; background: #eee; border: 1px solid #ccc; font-size: 12px; line-height: 16px;"> Aenean vel massa tellus. Aliquam imperdiet ante a justo luctus et bibendum erat porta. Morbi varius, erat et cursus ornare, elit augue bibendum leo, sed imperdiet nulla risus ut ipsum. Maecenas laoreet neque vitae magna porta sed euismod urna ornare. Nulla facilisi. Maecenas congue ligula eu arcu rhoncus volutpat. Etiam pretium pulvinar sapien, et ultrices augue euismod sagittis. Pellentesque sodales, velit tempor pharetra ultricies, lacus odio mattis ligula, vel sollicitudin erat nisl sed nisi. Pellentesque vestibulum suscipit libero, sit amet scelerisque purus aliquam vulputate. Etiam semper mauris ac felis convallis volutpat dictum ante placerat. Proin tempus elementum nisl ac eleifend. In hac habitasse platea dictumst. Duis et neque at mi lacinia luctus non ut neque. Praesent mollis metus at quam ornare bibendum. Cras augue tortor, tempor vitae adipiscing at, pulvinar vel massa. Curabitur et orci massa, sit amet malesuada diam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis vitae orci id lectus convallis tempus vel quis mauris. </div> <div class="buttonbox"> </div> </div> <div class="post"> <div class="socialleft">If you liked this, please share it.</div> <ul class="addtoany_list"> <li><a href="https://web.archive.org/web/20101120003401/http://twitter.com/share?url=http%3A%2F%2Fbit.ly%2Fc1KT0z&amp;counturl=http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/" class="twitter-share-button" data-count="vertical" data-via="bavotasan">Tweet</a><script type="text/javascript" src="https://web.archive.org/web/20101120003401js_/http://platform.twitter.com/widgets.js"></script></li> <li><a href="https://web.archive.org/web/20101120003401/http://www.facebook.com/sharer.php?u=http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/&amp;t=Add a Copyright Notice to Copied Text" title="Click to send this page to Facebook!" target="_blank" rel="nofollow" class="facebook-icon"></a></li> <li><a href="https://web.archive.org/web/20101120003401/http://digg.com/submit?phase=2&amp;url=http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/&amp;title=Add a Copyright Notice to Copied Text&amp;bodytext=I was checking out the CBC website and I noticed that if you copy and paste any text from the site a reference link appears at the bottom, indicating the source. I thought that was kind of neat and tried to figure out how to do it. Turns out, they use a service called Tynt. [...]" title="Digg" rel="nofollow" target="_blank" class="digg-icon"></a></li> <li><a href="https://web.archive.org/web/20101120003401/http://www.delicious.com/save" onclick="window.open('https://web.archive.org/web/20101120003401/http://www.delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent('https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/')+'&amp;title='+encodeURIComponent('Add a Copyright Notice to Copied Text'),'delicious', 'toolbar=no,width=550,height=550'); return false;" class="delicious-icon"></a></li> <li><a href="https://web.archive.org/web/20101120003401/http://www.stumbleupon.com/submit?url=http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/&amp;title=Add a Copyright Notice to Copied Text" title="StumbleUpon" rel="nofollow" target="_blank" class="stumbleupon-icon"></a></li> <li><iframe src="https://web.archive.org/web/20101120003401if_/http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fbavotasan.com%2Ftutorials%2Fadd-a-copyright-notice-to-copied-text%2F&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowtransparency="true"></iframe></li> </ul> </div> <div class="post"> <p class="tags">Tags: <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tag/clipboard/" rel="tag">clipboard</a>, <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tag/copy/" rel="tag">copy</a>, <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tag/copyright/" rel="tag">copyright</a>, <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tag/getselection/" rel="tag">getSelection</a>, <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tag/javascript/" rel="tag">Javascript</a>, <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tag/paste/" rel="tag">paste</a>, <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tag/text/" rel="tag">text</a></p> <p class="tags">Short URL: <a href="https://web.archive.org/web/20101120003401/http://bit.ly/c1KT0z" title="Add a Copyright Notice to Copied Text">http://bit.ly/c1KT0z</a></p> </div> <div class="post"> <div id="crp_related"> <h3>Similar Posts</h3> <ul> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/a-basic-jquery-slideshow/" rel="bookmark" title="Permanent Link to A Basic jQuery Slideshow">A Basic jQuery Slideshow</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/optimization-tips-speed-up-site/" rel="bookmark" title="Permanent Link to Optimization Tips to Speed Up Your Site">Optimization Tips to Speed Up Your Site</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/jquery-replace-word-with-link/" rel="bookmark" title="Permanent Link to Use jQuery to Replace a Word with a Link">Use jQuery to Replace a Word with a Link</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/a-simple-css-trick-to-vertically-align-text/" rel="bookmark" title="Permanent Link to A Simple CSS Trick to Vertically Align Text">A Simple CSS Trick to Vertically Align Text</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/articles/10-great-free-mac-apps-for-web-developers/" rel="bookmark" title="Permanent Link to 10 Great Free Mac Apps for Web Developers">10 Great Free Mac Apps for Web Developers</a></li> </ul> </div> <a href="https://web.archive.org/web/20101120003401/http://www.netfirms.com/web-hosting/web-hosting-business/?a_aid=4c8bb52b19602&amp;a_bid=8f049e07" target="_top" style="float:right;"><img src="https://web.archive.org/web/20101120003401im_/http://www.webhostrevenue.com/accounts/default1/banners/300x250-us.gif" alt="Netfirms Business Hosting Plan" title="Netfirms Business Hosting Plan" width="250" height="208"/></a><img style="border:0" src="https://web.archive.org/web/20101120003401im_/http://www.webhostrevenue.com/scripts/imp.php?a_aid=4c8bb52b19602&amp;a_bid=8f049e07" width="1" height="1" alt=""/> </div> <div class="post"> <a href="#comment_list"></a> <div id="comments"> <h3 id="comments-title">Discussion <small> 8 Comments</small> </h3> <ol class="commentlist"> <li class="comment even thread-even depth-1" id="li-comment-16593"> <div id="comment-16593"> <div class="comment-avatar"> <img alt="" src="https://web.archive.org/web/20101120003401im_/http://1.gravatar.com/avatar/f9878806bd68f1614870fe89a7328fde?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/> </div> <div class="comment-author"> <span class="authorname"><a href="https://web.archive.org/web/20101120003401/http://katalog.wyrusz.pl/" rel="external " class="url">covalic</a></span> <span class="commentdate"> on November 4, 2010 at 3:43 pm</span> </div> <div class="comment-text"> <p>WOW! This is great. Greatings.</p> </div> <div class="reply"> <a rel="nofollow" class="comment-reply-link" href="/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/?replytocom=16593#respond" onclick="return addComment.moveForm(&quot;comment-16593&quot;, &quot;16593&quot;, &quot;respond&quot;, &quot;2943&quot;)">Reply</a> </div> </div> </li> <li class="comment odd alt thread-odd thread-alt depth-1" id="li-comment-16616"> <div id="comment-16616"> <div class="comment-avatar"> <img alt="" src="https://web.archive.org/web/20101120003401im_/http://1.gravatar.com/avatar/390ef0540657c7b7f185d2f6a845db2e?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/> </div> <div class="comment-author"> <span class="authorname"><a href="https://web.archive.org/web/20101120003401/http://seyekuyinu.com/" rel="external " class="url">Seye Kuyinu</a></span> <span class="commentdate"> on November 6, 2010 at 11:44 am</span> </div> <div class="comment-text"> <p>Lovely. I am going to do a tutorial on my site right away, on how to create a plugin that attaches your copyright information to every content copied on your blog/website.</p> </div> <div class="reply"> <a rel="nofollow" class="comment-reply-link" href="/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/?replytocom=16616#respond" onclick="return addComment.moveForm(&quot;comment-16616&quot;, &quot;16616&quot;, &quot;respond&quot;, &quot;2943&quot;)">Reply</a> </div> </div> <ul class="children"> <li class="comment byuser bypostauthor even depth-2" id="li-comment-16618"> <div id="comment-16618"> <div class="comment-avatar"> <img alt="" src="https://web.archive.org/web/20101120003401im_/http://1.gravatar.com/avatar/ba043b2af6a355787f1b6fd1b1ea3eda?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/> </div> <div class="comment-author"> <span class="authorname"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/" rel="external " class="url">c.bavota</a></span> <span class="commentdate"> on November 6, 2010 at 1:59 pm</span> </div> <div class="comment-text"> <p>Sweet. Let me know when it is done.</p> </div> </div> </li> </ul> </li> <li class="comment odd alt thread-even depth-1" id="li-comment-16631"> <div id="comment-16631"> <div class="comment-avatar"> <img alt="" src="https://web.archive.org/web/20101120003401im_/http://1.gravatar.com/avatar/94f7cf52fd8b7d1d77a41735c7aaec04?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/> </div> <div class="comment-author"> <span class="authorname"><a href="https://web.archive.org/web/20101120003401/http://ilyaskazi.com/" rel="external " class="url">Ilyas Kazi</a></span> <span class="commentdate"> on November 8, 2010 at 12:37 am</span> </div> <div class="comment-text"> <p>Wow! what a magic. That&#8217;s really very lovely piece of code&#8230;. </p> <p>Just wondering.. can we trim out extra content so that only limited text to be copied?</p> </div> <div class="reply"> <a rel="nofollow" class="comment-reply-link" href="/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/?replytocom=16631#respond" onclick="return addComment.moveForm(&quot;comment-16631&quot;, &quot;16631&quot;, &quot;respond&quot;, &quot;2943&quot;)">Reply</a> </div> </div> <ul class="children"> <li class="comment byuser bypostauthor even depth-2" id="li-comment-16637"> <div id="comment-16637"> <div class="comment-avatar"> <img alt="" src="https://web.archive.org/web/20101120003401im_/http://1.gravatar.com/avatar/ba043b2af6a355787f1b6fd1b1ea3eda?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/> </div> <div class="comment-author"> <span class="authorname"><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/" rel="external " class="url">c.bavota</a></span> <span class="commentdate"> on November 8, 2010 at 11:42 am</span> </div> <div class="comment-text"> <p>Hmm. I guess that might be possible to limit the total number of characters allowed to be copied but then I really think you would have to explain that to your users or they might think something is broken.</p> </div> </div> </li> </ul> </li> <li class="comment odd alt thread-odd thread-alt depth-1" id="li-comment-16713"> <div id="comment-16713"> <div class="comment-avatar"> <img alt="" src="https://web.archive.org/web/20101120003401im_/http://1.gravatar.com/avatar/12c09febd08cd9dbbddb9f53cefd8087?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/> </div> <div class="comment-author"> <span class="authorname"><a href="https://web.archive.org/web/20101120003401/http://charltongomes.com/" rel="external " class="url">Charlton Gomes</a></span> <span class="commentdate"> on November 13, 2010 at 6:26 pm</span> </div> <div class="comment-text"> <p>Woah! Never thought that would be possible.</p> <p>Thanks for sharing! <img src="https://web.archive.org/web/20101120003401im_/http://bavotasan.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"/> </p> </div> <div class="reply"> <a rel="nofollow" class="comment-reply-link" href="/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/?replytocom=16713#respond" onclick="return addComment.moveForm(&quot;comment-16713&quot;, &quot;16713&quot;, &quot;respond&quot;, &quot;2943&quot;)">Reply</a> </div> </div> </li> <li class="comment even thread-even depth-1" id="li-comment-16767"> <div id="comment-16767"> <div class="comment-avatar"> <img alt="" src="https://web.archive.org/web/20101120003401im_/http://1.gravatar.com/avatar/35a0494fbbe2cd9e314e61839aac108e?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/> </div> <div class="comment-author"> <span class="authorname">Marios</span> <span class="commentdate"> on November 18, 2010 at 8:24 am</span> </div> <div class="comment-text"> <p>Is it possible to copy text with links inside?</p> </div> <div class="reply"> <a rel="nofollow" class="comment-reply-link" href="/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/?replytocom=16767#respond" onclick="return addComment.moveForm(&quot;comment-16767&quot;, &quot;16767&quot;, &quot;respond&quot;, &quot;2943&quot;)">Reply</a> </div> </div> </li> <li class="comment odd alt thread-odd thread-alt depth-1" id="li-comment-16782"> <div id="comment-16782"> <div class="comment-avatar"> <img alt="" src="https://web.archive.org/web/20101120003401im_/http://1.gravatar.com/avatar/bcaf8917f2493247ca48b256f6d7b18b?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/> </div> <div class="comment-author"> <span class="authorname"><a href="https://web.archive.org/web/20101120003401/http://basicblogtips.com/" rel="external " class="url">Ileane</a></span> <span class="commentdate"> on November 18, 2010 at 1:59 pm</span> </div> <div class="comment-text"> <p>Hey there, this is some nice work. FYI &#8211; I&#8217;m using the Tynt plugin and there is only one problem with doing this. I cut and paste some text from my own blog all of the time when I&#8217;m submitting articles to blog forums or social sharing sites. Each time I wanted to do this I would need to remove the copyright and it was really a pain. With the Tynt plugin I am able to supply them with my IP address so that the copyright doesn&#8217;t appear when I cut and paste. I&#8217;m not sure if it would be worth the time for you to code those exclusion options too.</p> <p>I must say this concept is pretty cool and I caught someone that was cutting and pasting from other comments into their own comments. This person didn&#8217;t speak English (I assume since their site was a translation service). Needless to say their comments ended up in the spam folder. (maybe someone was paying them to do this now that I think about it.)</p> <p>I just wanted to share that story, with you. Thanks for all of your hard work on themes and tweaking the code. <img src="https://web.archive.org/web/20101120003401im_/http://bavotasan.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"/> </p> </div> <div class="reply"> <a rel="nofollow" class="comment-reply-link" href="/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/?replytocom=16782#respond" onclick="return addComment.moveForm(&quot;comment-16782&quot;, &quot;16782&quot;, &quot;respond&quot;, &quot;2943&quot;)">Reply</a> </div> </div> </li> </ol> <a name="respond"></a> <div id="respond"> <h3 id="reply-title">Leave a Reply <small><a rel="nofollow" id="cancel-comment-reply-link" href="/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/#respond" style="display:none;">Cancel reply</a></small></h3> <form action="https://web.archive.org/web/20101120003401/http://bavotasan.com/wp-comments-post.php" method="post" id="commentform"> <p class="comment-notes">Your email address will not be published. Required fields are marked <span class="required">*</span></p> <p class="comment-form-author"><label for="author">Name</label> <span class="required">*</span><br/><input id="author" name="author" type="text" value="" size="30"/></p> <p class="comment-form-email"><label for="email">Email</label> <span class="required">*</span><br/><input id="email" name="email" type="text" value="" size="30"/></p> <p class="comment-form-url"><label for="url">Website</label><br/><input id="url" name="url" type="text" value="" size="30"/></p> <p>To enter code in the comment box, please place it between <strong>&lt;pre lang="php"&gt; &lt;/pre&gt;</strong> tags. You don't have to convert any characters to their hex/HTML code. Just add your code the way you would to any code editor.</p> <p class="comment-form-comment"><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p> <p class="form-submit"> <input name="submit" type="submit" id="submit" value="Post Comment"/> <input type="hidden" name="comment_post_ID" value="2943" id="comment_post_ID"/> <input type="hidden" name="comment_parent" id="comment_parent" value="0"/> </p> </form> </div><!-- #respond --> </div><!-- #comments --> </div> </div> <!-- begin sidebar --> <div id="sidebar"> <div id="search"> <form method="get" id="searchform" action="https://web.archive.org/web/20101120003401/http://bavotasan.com/"> <div> <input type="text" class="search_input" value="Search" name="s" id="s" onfocus="if (this.value == 'Search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}"/> <input type="hidden" id="searchsubmit" value="Search"/> </div> </form> <div class="arrow"></div> </div> <div id="sideads"> <!-- BuySellAds.com Zone Code --> <div id="bsap_1237633" class="bsarocks bsap_8982c17d635c33dbe23a7ef930777c37"></div> <!-- END BuySellAds.com Zone Code --> <br class="clear"/> <!-- BuySellAds.com Zone Code --> <div id="bsap_1237624" class="bsarocks bsap_8982c17d635c33dbe23a7ef930777c37"></div> <!-- END BuySellAds.com Zone Code --> </div> <br class="clear"/> <div class="line"></div> <div class="side-widget"> <h4>Most Popular Posts</h4> <ul class="wppp_list"> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/creating-a-jquery-mouseover-fade-effect/" title="Creating a Mouseover Fade Effect with jQuery ">Creating a Mouseover Fade Effect with jQuery </a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/a-simple-mouseover-hover-effect-with-jquery/" title="A Simple Mouseover Hover Effect with jQuery">A Simple Mouseover Hover Effect with jQuery</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/full-sizebackground-image-jquery-plugin/" title="Full Size Background Image jQuery Plugin">Full Size Background Image jQuery Plugin</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/processing-multiple-forms-on-one-page-with-php/" title="Processing Multiple Forms on One Page with PHP">Processing Multiple Forms on One Page with PHP</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/magazine-basic-free-wordpress-theme/" title="Magazine Basic v2.6 WordPress Theme">Magazine Basic v2.6 WordPress Theme</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/6-free-vinyl-record-vectors/" title="6 Free Vinyl Record Vectors">6 Free Vinyl Record Vectors</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/php-code-to-redirect-mobilehandheld-users/" title="PHP Code to Redirect Mobile/Handheld Users">PHP Code to Redirect Mobile/Handheld Users</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/how-to-create-a-twitter-feed-on-your-web-site/" title="How to Create a Twitter Feed on Your Web Site">How to Create a Twitter Feed on Your Web Site</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/limiting-the-number-of-words-in-your-excerpt-or-content-in-wordpress/" title="Excerpt or Content Word Limit in WordPress: Redux">Excerpt or Content Word Limit in WordPress: Redux</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/adding-extra-fields-to-the-wordpress-user-profile/" title="Adding Extra Fields to the WordPress User Profile">Adding Extra Fields to the WordPress User Profile</a></li> </ul> </div> <div id="affiliates-ads"> <a href="https://web.archive.org/web/20101120003401/http://themes.bavotasan.com/" class="themes"></a> <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/delete-duplicate-posts-pro-wordpress-plugin/" class="deletedupes"></a> <a href="https://web.archive.org/web/20101120003401/https://secure1.inmotionhosting.com/cgi-bin/gby/clickthru.cgi?id=tinkerpriest&amp;page=7" class="inmotion"></a> </div> <div class="line"></div> <div class="side-widget redlink"> <h4>Get a Premium Theme for FREE</h4> <p><a href="https://web.archive.org/web/20101120003401/https://secure1.inmotionhosting.com/cgi-bin/gby/clickthru.cgi?id=tinkerpriest" class="wordpress-logo"></a>Don't have a Web site? How would you like to have WordPress and a <a href="https://web.archive.org/web/20101120003401/http://themes.bavotasan.com/category/premium-themes">Themes by bavotasan.com</a> Premium theme installed and configured for <em>FREE</em>? All you need to do is <a href="https://web.archive.org/web/20101120003401/https://secure1.inmotionhosting.com/cgi-bin/gby/clickthru.cgi?id=tinkerpriest">sign up with InMotion Hosting through this link</a>. <br/> <br/> <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/free-premium-theme/" class="fr"><em>Click here for more information &raquo;</em></a> </p> </div> <div class="side-widget"> <h4>Support c.bavota</h4> <p>If you would like to support <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/">c.bavota</a> and <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/">bavotasan.com</a>, please use the donate link below. Any amount, even $1.00, is appreciated (a man's gotta eat, ya know).</p> <a href="https://web.archive.org/web/20101120003401/https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=5745952" id="donate" class="fr">Donate</a> </div> </div> <!-- end sidebar --></div> </div> <!-- begin footer --> <div class="whiteline"></div> <div id="footer"> <div id="bottombar"> <a href="javascript:void(0)" class="backtotop">Back to Top<span></span></a> <div class="col col1"> <h4 class="one"><span></span>Stay in Touch</h4> <a href="https://web.archive.org/web/20101120003401/http://twitter.com/bavotasan" class="footer-twitter"><span></span>Follow me on Twitter</a><br/> <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/feed/" class="footer-rss"><span></span>Subscribe to my RSS Feed</a> <br class="clear"/> <h4 class="two"><span></span>Stay in Tune</h4> <div class="tweets"></div> </div> <div class="col col2"> <h4 class="three"><span></span>Downloads</h4> <ul> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/my-first-vanilla-plugin/">My First Vanilla Plugin</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/delete-duplicate-posts-pro-wordpress-plugin/">Delete Duplicate Posts Pro WordPress Plugin</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/feed-me-seymour-free-wordpress-theme/">Feed Me, Seymour 1.2</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/magazine-basic-free-wordpress-theme/">Magazine Basic v2.6 WordPress Theme</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/sliderota-jquery-plugin/">Sliderota jQuery Plugin</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/full-sizebackground-image-jquery-plugin/">Full Size Background Image jQuery Plugin</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/easy-overlay-modal-window-jquery-plugin/">Easy Overlay Modal Window jQuery Plugin</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/snowblind-free-wordpress-theme/">Snowblind v1.1.2 Free WordPress Theme</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/8-free-colorful-background-textures-for-designers/">8 Free Colorful Background Textures for Designers</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/downloads/stationery-premium-wordpress-theme/">Stationery Premium WordPress Theme</a></li> </ul> </div> <div class="col col3"> <h4 class="four"><span></span>Tutorials</h4> <ul> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/add-a-copyright-notice-to-copied-text/">Add a Copyright Notice to Copied Text</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/meta-descriptions-wordpress/">Meta Descriptions for WordPress</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/turning-on-php-errors/">Turning On PHP Errors</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/using-css-resets/">Using CSS Resets</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/a-sleek-navigation-menu-with-css3/">A Sleek Navigation Menu with CSS3</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/a-basic-jquery-slideshow/">A Basic jQuery Slideshow</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/text-rotation-css3/">Text Rotation with CSS3</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/adding-tweet-button-wordpress/">Adding a Tweet Button to WordPress</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/developing-themes-for-wordpress-make-money/">Developing Themes for WordPress: Part 5</a></li> <li><a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/tutorials/developing-themes-for-wordpress-options/">Developing Themes for WordPress: Part 4</a></li> </ul> </div> </div> </div> <div id="copyright"> <div id="copyright-wrapper"> Copyright &copy; 2010 <a href="https://web.archive.org/web/20101120003401/http://bavotasan.com/">bavotasan.com</a>. All Rights Reserved. Powered by <a href="https://web.archive.org/web/20101120003401/http://www.wordpress.org/">WordPress</a>. </div> </div> <!--stats_footer_test--><script src="https://web.archive.org/web/20101120003401js_/http://stats.wordpress.com/e-201046.js" type="text/javascript"></script> <script type="text/javascript"> st_go({blog:'5317602',v:'ext',post:'2943'}); var load_cmc = function(){linktracker_init(5317602,2943,2);}; if ( typeof addLoadEvent != 'undefined' ) addLoadEvent(load_cmc); else load_cmc(); </script> <script type="text/javascript" src="https://web.archive.org/web/20101120003401js_/http://bavotasan.com/wp-content/themes/bavotasan-2010/js/coolstuff.js"></script> <script type="text/javascript"> hs.graphicsDir = 'https://web.archive.org/web/20101120003401/http://bavotasan.com/images/graphics/'; hs.outlineType = 'rounded-white'; hs.outlineWhileAnimating = true; hs.showCredits = false; </script> <!-- Bavota San 2010 theme designed by c.bavota, http://bavotasan.com --> <script type="text/javascript">function addLink() { var body_element = document.getElementById('testp'); var selection; if (window.getSelection) { selection = window.getSelection(); } var pagelink = "<br /><br /> Read more at: <a href='"+document.location.href+"'>"+document.location.href+"</a><br />Copyright &copy; c.bavota"; // change this if you want 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.getElementById('testp').oncopy = addLink;</script></body> </html> <!-- Dynamic page generated in 0.537 seconds. --> <!-- Cached page generated by WP-Super-Cache on 2010-11-18 14:22:01 --> <!-- super cache --><!-- FILE ARCHIVED ON 00:34:01 Nov 20, 2010 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 16:39:24 Nov 25, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.477 exclusion.robots: 0.025 exclusion.robots.policy: 0.016 esindex: 0.01 cdx.remote: 10.761 LoadShardBlock: 258.847 (3) PetaboxLoader3.datanode: 79.768 (4) PetaboxLoader3.resolve: 158.822 (2) load_resource: 148.377 -->

Pages: 1 2 3 4 5 6 7 8 9 10