-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathab.js
45 lines (38 loc) · 1.8 KB
/
ab.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Disable common developer tool shortcuts
document.addEventListener('keydown', function(event) {
// Disable Ctrl+U (view source)
if (event.ctrlKey && event.key === 'u') {
event.preventDefault();
window.location.href = 'https://ab-datagh.vercel.app'; // Redirect to the specified URL
}
// Disable F12 (open developer tools)
if (event.key === 'F12') {
event.preventDefault();
window.location.href = 'https://ab-datagh.vercel.app';
}
// Disable Ctrl+Shift+I (open developer tools)
if (event.ctrlKey && event.shiftKey && event.key === 'I') {
event.preventDefault();
window.location.href = 'https://ab-datagh.vercel.app';
}
// Disable Ctrl+Shift+C (inspect element)
if (event.ctrlKey && event.shiftKey && event.key === 'C') {
event.preventDefault();
window.location.href = 'https://ab-datagh.vercel.app';
}
// Disable Ctrl+Shift+J (open JavaScript console)
if (event.ctrlKey && event.shiftKey && event.key === 'J') {
event.preventDefault();
window.location.href = 'https://ab-datagh.vercel.app';
}
});
// Disable right-click context menu
document.addEventListener('contextmenu', function(event) {
event.preventDefault();
window.location.href = 'https://ab-datagh.vercel.app';
});
// Optional: Prevent user from dragging content (for copying)
document.addEventListener('dragstart', function(event) {
event.preventDefault();
window.location.href = 'https://ab-datagh.vercel.app';
});