Copyright text and webpage url while copying data from webpage using Javascript | 2my4edge

16 February 2022

Copyright text and webpage url while copying data from webpage using Javascript

Here i'm going to tell you one of most interesting and simple script to make our web page url and content copyright text while copying data from our web page. This is one of the simple and useful technique to make our site spread while copying our data form our site.

Copyright content while copying in web page

This is one of the simple method without query, we don't want jquery for this, by using one script while copying day we are appending the copyright content text and url of the web page. let see the code script.

SCRIPT

<script type="text/javascript">
function Getcopylink() {
    var body = document.getElementsByTagName('body')[0];
    var selection_area;
    selection_area = window.getSelection();
    var copyright_content = "<br /><br /> -----> Read more at: "+document.location.href+" 
                             &copy Arunkumar Maha"; // change this if you want
    var copyingtext = selection_area + copyright_content;
    var newdiv = document.createElement('div');
    newdiv.style.position='absolute';
    newdiv.style.left='-99999px';
    body.appendChild(newdiv);
    newdiv.innerHTML = copyingtext;
    selection_area.selectAllChildren(newdiv);
    window.setTimeout(function() {
        body.removeChild(newdiv);
    },0);
}
document.oncopy = Getcopylink;
</script>

HTML CONTENT
<div style="width:80%; margin:0 auto;" >

<h4>
    <a href="http://www.2my4edge.com/2015/10/auto-complete-google-map-in-form-input.html"> 
    Auto complete Google map in form input type using geocomplete Jquery </a></h4>
<p> Here i'm going to tell you one of the interesting thing regarding web development. 
    now a days most of the website need google map location while we are entering location 
    name, for that we have one solution. When we are entering the location name in input type 
    you will get map for that particular location by using Jquery, let see the code for that. </p>

<h4><a href="http://www.2my4edge.com/2015/10/multiple-image-upload-preview-before.html"> 
    Multiple image upload preview before image uploading to the server using Jquery</a></h4>
<p> Here i'm going to tell you one of the useful tip for multiple image uploading preview, when 
    ever we are uploading image we need instant image preview, for that we are going to use html5 
    filereader. and here we are going to use the jquery for instant image preview. let see the 
    simple code. </p>

<h4><a href="http://www.2my4edge.com/2015/09/google-inbox-style-design-using.html"> 
    Google Inbox style design using Bootstrap </a></h4>
<p> Here i'm going to make google inbox style design using bootstrap with font-awesome icons. i hope 
    everybody knew about google inbox that is similar like gmail. In that, there is an design for compose 
    mail as i'm showing in the below image. like that only we are going do here. lets see the code </p>

<h4><a href="http://www.2my4edge.com/2015/08/cart-quantity-increment-decrement-using.html"> 
    Cart quantity increment / decrement using Javascript onclick </a></h4>
<p> OnClick increment and decrement value in input text for cart quantity value. here i'm going to help 
    you a onclick increment value and decrement value in input type cart quantity field. let see the 
    code for on click increment and decrement. </p>

<h4><a href="http://www.2my4edge.com/2015/08/automatic-loader-at-top-of-page-for.html"> 
    Automatic loader at the top of page for complete the page load</a></h4>
<p> Here i'm going to explain the simple design style like YouTube page loading at the top of the page, 
    you can see when the YouTube page reloads that time one small red strip will be in the top of the page. 
    here we are going to make that kind of page loaded effect using pace.min.js. Let's see the simple code 
    for that. </p>

<h4><a href="http://www.2my4edge.com/2015/08/simple-way-to-make-text-center-to-div.html"> 
    Simple way to make text center to the div using css3</a></h4>
<p> Today i'm going to tell you one small trick to make text center in div by vertically and horizontally. 
    here i'm going to make the texts center of the div using css3 transform code. lets see the simple 
    code below. </p>

</div>

That's it, I hope this script will really help to secure and useful. Thanks for your time. Keep in touch with us for more interesting tutorial. stay connected with us in all social media.

No comments:

Post a Comment

^