Skip to content

Commit 536b3fb

Browse files
Update index.html
1 parent e9553e0 commit 536b3fb

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,35 @@ <h4>Some useful posts:</h4>
6060
event.preventDefault();
6161
});
6262
</script>
63+
<script>
64+
// Disable Right Click + Keyboard Shortcuts + Basic Protection
65+
document.addEventListener('contextmenu', function(e) {
66+
e.preventDefault();
67+
});
68+
69+
document.onkeydown = function(e) {
70+
if (e.keyCode == 123) { // F12
71+
return false;
72+
}
73+
if (e.ctrlKey && e.shiftKey && (e.keyCode == 'I'.charCodeAt(0))) { // Ctrl+Shift+I
74+
return false;
75+
}
76+
if (e.ctrlKey && e.shiftKey && (e.keyCode == 'J'.charCodeAt(0))) { // Ctrl+Shift+J
77+
return false;
78+
}
79+
if (e.ctrlKey && (e.keyCode == 'U'.charCodeAt(0))) { // Ctrl+U
80+
return false;
81+
}
82+
if (e.ctrlKey && (e.keyCode == 'S'.charCodeAt(0))) { // Ctrl+S
83+
return false;
84+
}
85+
if (e.ctrlKey && (e.keyCode == 'P'.charCodeAt(0))) { // Ctrl+P
86+
return false;
87+
}
88+
if (e.keyCode == 27) { // Escape
89+
return false;
90+
}
91+
};
92+
</script>
93+
6394
</html>

0 commit comments

Comments
 (0)