From 154edf7ca619e506ee04e92bc1d17d3d1289233b Mon Sep 17 00:00:00 2001 From: FURK4NGG <105324908+FURK4NGG@users.noreply.github.com> Date: Sat, 15 Mar 2025 22:56:00 +0300 Subject: [PATCH] Update 404.html --- 404.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/404.html b/404.html index 8d43bfd..5265312 100644 --- a/404.html +++ b/404.html @@ -131,6 +131,21 @@ d.fx = null; d.fy = null; } + + const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled + const showAlert = e => { + e.preventDefault(); // preventing its default behaviour + return alert("Sorry, you can't view or copy source codes this way!"); + } + document.addEventListener("contextmenu", e => { + showAlert(e); // calling showAlert() function on mouse right click + }); + document.addEventListener("keydown", e => { + // calling showAlert() function, if the pressed key matched to disabled keys + if((e.ctrlKey && disabledKeys.includes(e.key)) || e.key === "F12") { + showAlert(e); + } + });
Please try to go back or return to the homepage.