diff --git a/index.html b/index.html index 0bfad90..a62a500 100644 --- a/index.html +++ b/index.html @@ -353,7 +353,6 @@ - diff --git a/js/protection.js b/js/protection.js deleted file mode 100644 index df0d5e9..0000000 --- a/js/protection.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * Website Protection Script - * Prevents copying, downloading, and inspection of website content - */ - -(function() { - 'use strict'; - - // TEMPORARILY DISABLED FOR DEVELOPMENT - 2026-01-08 - console.log('⚠️ Protection disabled for development'); - return; - - // Check if user is on a mobile device - const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || - ('ontouchstart' in window) || - (navigator.maxTouchPoints > 0); - - // Exit early if on mobile device - no protection - if (isMobile) { - console.log('Mobile device detected - protection disabled'); - return; - } - - // Disable right-click context menu - document.addEventListener('contextmenu', function(e) { - e.preventDefault(); - return false; - }); - - // Disable text selection - except for auth password field - document.addEventListener('selectstart', function(e) { - // Allow text selection in the authentication password field - if (e.target && e.target.id === 'auth-password') { - return true; - } - e.preventDefault(); - return false; - }); - - // Disable drag - document.addEventListener('dragstart', function(e) { - e.preventDefault(); - return false; - }); - - // Disable copy - except for auth password field - document.addEventListener('copy', function(e) { - // Allow copy in the authentication password field - if (e.target && e.target.id === 'auth-password') { - return true; - } - e.preventDefault(); - return false; - }); - - // Disable cut - except for auth password field - document.addEventListener('cut', function(e) { - // Allow cut in the authentication password field - if (e.target && e.target.id === 'auth-password') { - return true; - } - e.preventDefault(); - return false; - }); - - // Allow paste everywhere - removed restriction - // document.addEventListener('paste', function(e) { - // e.preventDefault(); - // return false; - // }); - - // Disable print - window.addEventListener('beforeprint', function(e) { - e.preventDefault(); - return false; - }); - - // Detect and block DevTools - let devtools = {open: false, orientation: null}; - const threshold = 160; - const emitEvent = (state, orientation) => { - if (state) { - console.clear(); - document.body.style.display = 'none'; - document.body.innerHTML = '

Zugriff verweigert

'; - } - }; - - setInterval(() => { - if (window.outerHeight - window.innerHeight > threshold || - window.outerWidth - window.innerWidth > threshold) { - if (!devtools.open) { - emitEvent(true, null); - devtools.open = true; - } - } else { - if (devtools.open) { - emitEvent(false, null); - devtools.open = false; - } - } - }, 500); - - // Disable F12, Ctrl+Shift+I, Ctrl+Shift+J, Ctrl+U, Ctrl+S - document.addEventListener('keydown', function(e) { - // F12 - if (e.keyCode === 123) { - e.preventDefault(); - return false; - } - // Ctrl+Shift+I (DevTools) - if (e.ctrlKey && e.shiftKey && e.keyCode === 73) { - e.preventDefault(); - return false; - } - // Ctrl+Shift+J (Console) - if (e.ctrlKey && e.shiftKey && e.keyCode === 74) { - e.preventDefault(); - return false; - } - // Ctrl+U (View Source) - if (e.ctrlKey && e.keyCode === 85) { - e.preventDefault(); - return false; - } - // Ctrl+S (Save) - if (e.ctrlKey && e.keyCode === 83) { - e.preventDefault(); - return false; - } - // Ctrl+A (Select All) - if (e.ctrlKey && e.keyCode === 65) { - e.preventDefault(); - return false; - } - // Ctrl+C (Copy) - if (e.ctrlKey && e.keyCode === 67) { - e.preventDefault(); - return false; - } - // Ctrl+X (Cut) - if (e.ctrlKey && e.keyCode === 88) { - e.preventDefault(); - return false; - } - // Ctrl+V (Paste) - Allow paste - // if (e.ctrlKey && e.keyCode === 86) { - // e.preventDefault(); - // return false; - // } - }); - - // Disable image dragging - const images = document.getElementsByTagName('img'); - for (let i = 0; i < images.length; i++) { - images[i].addEventListener('dragstart', function(e) { - e.preventDefault(); - return false; - }); - images[i].addEventListener('mousedown', function(e) { - e.preventDefault(); - return false; - }); - } - - // Clear console periodically - setInterval(function() { - console.clear(); - console.log('%cSicherheitswarnung!', 'color: red; font-size: 30px; font-weight: bold;'); - console.log('%cDiese Browser-Funktion ist für Entwickler vorgesehen. Unbefugter Zugriff ist untersagt.', 'color: red; font-size: 16px;'); - }, 1000); - - // Detect console.log override attempts - const originalLog = console.log; - console.log = function() { - originalLog.apply(console, arguments); - console.clear(); - }; - - // Disable text highlighting with CSS - const style = document.createElement('style'); - style.innerHTML = ` - * { - -webkit-user-select: none !important; - -moz-user-select: none !important; - -ms-user-select: none !important; - user-select: none !important; - -webkit-touch-callout: none !important; - -webkit-user-drag: none !important; - } - - img { - pointer-events: none !important; - -webkit-user-drag: none !important; - -khtml-user-drag: none !important; - -moz-user-drag: none !important; - -o-user-drag: none !important; - user-drag: none !important; - } - - @media print { - body { - display: none !important; - } - } - `; - document.head.appendChild(style); - - // Protection against automated tools - if (window.automation || window.callPhantom || window._phantom || window.__nightmare || window.WebDriverException || document.__webdriver_evaluate || document.__selenium_evaluate || document.__webdriver_script_function || document.__webdriver_script_func || document.__webdriver_script_fn || document.__fxdriver_evaluate || document.__driver_unwrapped || document.__webdriver_unwrapped || document.__driver_evaluate || document.__selenium_unwrapped || document.__fxdriver_unwrapped) { - document.body.style.display = 'none'; - document.body.innerHTML = ''; - } - -})(); \ No newline at end of file