-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
69 lines (60 loc) · 1.8 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// navbar closing when press
const closeLinks = document.querySelectorAll('.close-nav');
closeLinks.forEach(link => {
link.addEventListener('click', () => {
const navbar = document.getElementById('navbar-default');
navbar.classList.add('hidden');
});
});
// scroll reveal
ScrollReveal({
reset: true,
distance:'75px',
duration:1000,
delay:50
});
ScrollReveal().reveal('.heroimg, .line, .grid1, .grid2, .grid3, .picture1, .picture2, .picture3, .picture4, .picture5' , { origin: 'bottom'});
ScrollReveal().reveal('.aboutimg' , { origin: 'right'});
// make the image cannot be copied
var isCtrl = false;
document.onkeyup=function(e)
{
if(e.which == 17)
isCtrl=false;
}
document.onkeydown=function(e)
{
if(e.which == 123)
isCtrl=true;
if (((e.which == 85) || (e.which == 65) || (e.which == 88) || (e.which == 67) || (e.which == 86) || (e.which == 2) || (e.which == 3) || (e.which == 123) || (e.which == 83)) && isCtrl == true)
{
return false;
}
// make the website cant right clicked
// }
// // right click code
// var isNS = (navigator.appName == "Netscape") ? 1 : 0;
// if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
// function mischandler(){
// return false;
// }
// function mousehandler(e){
// var myevent = (isNS) ? e : event;
// var eventbutton = (isNS) ? myevent.which : myevent.button;
// if((eventbutton==2)||(eventbutton==3)) return false;
// }
// document.oncontextmenu = mischandler;
// document.onmousedown = mousehandler;
// document.onmouseup = mousehandler;
// //select content code disable alok goyal
// function killCopy(e){
// return false
// }
// function reEnable(){
// return true
// }
// document.onselectstart=new Function ("return false")
// if (window.sidebar){
// document.onmousedown=killCopy
// document.onclick=reEnable
}