29 lines
793 B
JavaScript
Executable file
29 lines
793 B
JavaScript
Executable file
// PROTECT.js
|
|
// Protect the site's content
|
|
|
|
// Prevent right-click context menu
|
|
document.addEventListener('contextmenu', function (e) {
|
|
e.preventDefault();
|
|
});
|
|
|
|
// Prevent text selection
|
|
document.addEventListener('selectstart', function (e) {
|
|
e.preventDefault();
|
|
});
|
|
|
|
// Block Ctrl+C and other keyboard shortcuts for copying
|
|
document.addEventListener('keydown', function (e) {
|
|
if (e.ctrlKey && e.key === 'c') { // Blocks Ctrl+C
|
|
e.preventDefault();
|
|
}
|
|
if (e.ctrlKey && e.shiftKey && e.key === 'v') { // Blocks Ctrl+Shift+V
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
|
|
// Additional measures for image protection
|
|
document.addEventListener('contextmenu', function (e) {
|
|
if (e.target.tagName.toLowerCase() === 'img') {
|
|
e.preventDefault();
|
|
}
|
|
});
|