File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments