BLOCKING SELECTS TEXT


We can make our site anti copy text, right click not allowed and blocking text not allowed. To make visitor blocked to steal site content, there is many ways. But what I want to share with you, there are two ways to make that happen. You can change one script, please choose the one suits you. But we must knowing the consequences first, we must have reason for blocking some default feature. For an example, if you have tutorial's blog or food's recipe blog. People often needs to copy your text, right?


BLOCKING ALL CONTENTS IN YOUR PAGES

Disable all, anywhere and anything. This is inclucing:
• Block CTRL+C.
• Block CTRL+U.
• Block F12.
• Block right click.
• Block text select.
For using this features, find tag <body> in your template. All HTML must be have <body> tag including WordPress, Blogger, Blogspot, Drupal, Joomla, etc.

From:

<body>

Then change to this:

<body oncontextmenu='return false;' onkeydown='return false;' onmousedown='return false;'>


BLOCKING ALL CONTENTS WITHIN ARTICLE POST

Disabling function inside post area inclucing:
• Right click still enable inside post body or article body.
• Blocking text selection inside post body or article body.
• Visitor still able to do the left click outside the contents.

Adding it into you CSS styling area:

.blog-content, post-body entry-content, blog-post {-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}


BLOCKING POST EXLUDES BLOCKQUOTE, CODE, PRE

This is additional code from number 2, with some modification now we are have different rules. We can still copy the some of text inside the article.
This is will effects:
• 'blockquote'
• 'code'
• 'bold text'
• 'title' area.
• and 'sub-title'.

Add this to your stylesheet too:

.post-body{-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}
blockquote,.blocktext,.blockquote,code,pre,i,b,h1,h2,h3,h4,h5,h6{-webkit-touch-callout:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text;-khtml-user-select: text;}






Rebates Bonus
Exclusive Rebate

Sign up today and be the first to get notified on new updates.


LOAD DISCUSSION