-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.js
35 lines (32 loc) · 870 Bytes
/
script.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
/*
THIS FILE WAS DEVELOPED BY MEHMET GUDUK
© 2022 COPYRIGHT, LICENSED WITH GPL-3.0 LICENSE, AUTHOR IS MEHMET GUDUK
https://github.com/mehmetguduk
*/
const img = document.querySelectorAll("img");
img.forEach(element => {
element.setAttribute("draggable", "false");
})
/* DISABLED RIGHT CLICK */
function clickIE() {
if (document.all) {
return false;
}
}
function clickNS(e) {
if (document.layers || (document.getElementById && !document.all)) {
if (e.which == 2 || e.which == 3) {
(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = clickNS;
}
else {
document.onmouseup = clickNS;
document.oncontextmenu = clickIE;
}
document.oncontextmenu = new Function("return false");