Addon 2x [VNXF 2x] Disable Mouse - Chặn chuột phải và bôi đen nội dung bài viết

Blue

Founder
Thành viên BQT
Có nhiều diễn đàn về tin tức và các thông tin độc quyền không muốn chia sẻ và để bị copy quá dễ dàng, muốn ngăn chặn, hạn chế những "tay xào bài" chuyên nghiệp hành động quá nhanh. Addon [VNXF 2x] Disable Mouse - Chặn chuột phải và bôi đen nội dung bài viết sẽ giúp bạn thực hiện điều này.

How to protect blog content copy.gif

Đúng như cái tên của mình, addon [VNXF 2x] Disable Mouse - Chặn chuột phải và bôi đen nội dung bài viết sẽ hỗ trợ bạn nhiều đó, hãy thử và cảm nhận.

Blue VNXF
 
Thực tế cái này có thể dùng css và js để làm :D
Cơ mà vẫn ủng hộ admin vì 1 addon simple cho newbie như mình :p
 
Mình thấy cài nhiều Add-on như này sẽ dễ làm xung đột code, nên mình đã sử dụng Css và js như bạn thanhhai nói để thực hiện. Bằng cách sử dụng Google tags sẽ đơn giản hơn nhiều.

Các bạn có thể test chức năng này ở diễn đàn sinh viên thẩm định giá

HTML:
<style>
body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
<script type="text/javascript">
//<=!=[=C=D=A=T=A=[
document.onkeypress = function(event) {
event = (event || window.event);
if (event.keyCode === 123) {
//alert('No F-12');
return false;
}
};
document.onmousedown = function(event) {
event = (event || window.event);
if (event.keyCode === 123) {
//alert('No F-keys');
return false;
}
};
document.onkeydown = function(event) {
event = (event || window.event);
if (event.keyCode === 123) {
//alert('No F-keys');
return false;
}
};
function contentprotector() {
return false;
}
function mousehandler(e) {
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if ((eventbutton === 2) || (eventbutton === 3))
return false;
}
document.oncontextmenu = contentprotector;
document.onmouseup = contentprotector;
var isCtrl = false;
window.onkeyup = function(e)
{
if (e.which === 17)
isCtrl = false;
}
window.onkeydown = function(e)
{
if (e.which === 17)
isCtrl = true;
if (((e.which === 85) || (e.which === 65) || (e.which === 88) || (e.which === 67) || (e.which === 86) || (e.which === 83)) && isCtrl === true)
{
return false;
}
}
isCtrl = false;
document.ondragstart = contentprotector;
//]=]=> </script>
 
Mình thấy cài nhiều Add-on như này sẽ dễ làm xung đột code, nên mình đã sử dụng Css và js như bạn thanhhai nói để thực hiện. Bằng cách sử dụng Google tags sẽ đơn giản hơn nhiều.

Các bạn có thể test chức năng này ở diễn đàn sinh viên thẩm định giá

HTML:
<style>
body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
<script type="text/javascript">
//<=!=[=C=D=A=T=A=[
document.onkeypress = function(event) {
event = (event || window.event);
if (event.keyCode === 123) {
//alert('No F-12');
return false;
}
};
document.onmousedown = function(event) {
event = (event || window.event);
if (event.keyCode === 123) {
//alert('No F-keys');
return false;
}
};
document.onkeydown = function(event) {
event = (event || window.event);
if (event.keyCode === 123) {
//alert('No F-keys');
return false;
}
};
function contentprotector() {
return false;
}
function mousehandler(e) {
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if ((eventbutton === 2) || (eventbutton === 3))
return false;
}
document.oncontextmenu = contentprotector;
document.onmouseup = contentprotector;
var isCtrl = false;
window.onkeyup = function(e)
{
if (e.which === 17)
isCtrl = false;
}
window.onkeydown = function(e)
{
if (e.which === 17)
isCtrl = true;
if (((e.which === 85) || (e.which === 65) || (e.which === 88) || (e.which === 67) || (e.which === 86) || (e.which === 83)) && isCtrl === true)
{
return false;
}
}
isCtrl = false;
document.ondragstart = contentprotector;
//]=]=> </script>
canf lawms mot huong dan!
 
Back
Top