Thứ Bảy, 2 tháng 6, 2012

How To Disable Copying Text On Blogger


Disable Select All Text For Sites
Today, I want my readers to know how to protect your hard work put on creating and writing new articles on your website or blog from being copied by others.

Copying the text from your site and posting it elsewhere is common on the Internet. There are sites which doesn't allow us to copy the text from the web pages. The copy function is disabled in the site by the site admin in order to protect the site. We will see how to implement the same methodology for Blogger. This trick is valid for any sites. This trick is going to disable (Ctrl+A) function for your site.


Sometimes the trick may not be compatible with some old browsers. But, we will see how to make things more secure in my future posts.




Steps to implement:

1. Go to Dashboard > Select the blog where you would like to implement the code


2. Go to Layout > Add a Gadget > Select "HTML/JavaScript gadget"


3. Paste the following code in the box:


<!-- START disable copy paste -->
<script src='demo-to-prevent-copy-paste-on-blogger_files/googleapis.js'></script><script type='text/javascript'> if (typeof document.onselectstart!="undefined" ) { document.onselectstart=new Function ("return false" ); } else{ document.onmousedown=new Function ("return false" ); document.onmouseup=new Function ("return true" ); } </script>
<!-- END disable copy paste -->


4. You are done!!! Check out how it works.

Note: The above code can also be placed between <head> & </head> 

Read More

How to make a Javascript Welcome Popup Box

Have you ever wondered how to make those little grey popup boxes, that welcome visitors to your homepage? Here's how to do it!

Drag your cursor over the script below to highlight it. Then press 'control' and 'c' at the same time to copy it to your clipboard.

Open your homepage editor, for example I use Front Page Express or Dreamweaver. Then paste the code into your html source by pressing 'control' and 'v' at the same time.

 



My Alert is the name of the function and can be called whatever you wish.

You may also change the wording .

Read More
Được tạo bởi Blogger.