-
Notifications
You must be signed in to change notification settings - Fork 0
/
Desktop java.js
131 lines (124 loc) · 3.65 KB
/
Desktop java.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<script>
var passwd = Math.floor(Math.random() * 9000) + 999;
$(function(){
$(".lockscreen").click(function(){
$(".lockscreen").show();
$(".lockscreen").css("-webkit-animation"," open 1s");
setTimeout(function(){
$(".lockscreen").hide();
},999)
});
$(".header").click(function(){
$(".lockscreen").show();
$(".lockscreen").css("-webkit-animation"," close 1s");
});
$(".fol").on("contextmenu",function(){
});
$("#lk").click(function(){
$(".lockscreen").show();
$(".lockscreen").css("-webkit-animation"," close 1s");$(".rc").hide();
});
$(".this_pc").click(function(){
alert("This Pc is under construction");
});
$(".rcb").click(function(){
alert("Recycle Bin is empty! ");
});
$(".crm").click(function(){
window.open("https://www.google.com");
});
var date=new Date();
var h=date.getHours();
var m=date.getMinutes();
m<10?m="0"+m:m=m;
var z=date.getDay();
var dd=date.getDate();
var y=date.getYear();
var mm=date.getMonth(); d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
var mo=["January","February","March","April","May","June","July","August","September","October","November","December"];
var day=d[z]+",";
var time=h+":"+m;
var mon=mo[mm];
var date=dd+" "+mon;
$("span.time").html(time);
$("div span.day").html(day);
$("div span.date").html(date);
$(".sign_in").click(function(){
if($(".login_pass").val()==passwd){
$(".login_pass").attr("value","");
$(".login").hide();
}
else {if($(".login_pass").val==""){
alert("Nan");}
else{
alert("Incorrect Password");
}
}
})
$(".start").on("mouseover",function(){
$(".menu").show();
$(".news").show();
});
$(".desktop").click(function(){
$(".menu").hide();
$(".rc").hide()
})
$("#refresh").click(function(){
$(".desktop").css("-webkit-animation","rfrs 0.1s infinite");
setTimeout(function(){
$(".desktop").css("-webkit-animation","none");
},200);
$("#rc").hide();
});
$("#bg").click(function(){
$("#color").click();
$("#rc").hide();
});
$("#nfol").click(function(){
$(".fol").show();
$(".tfol").show();
$(".tfol").attr("contenteditable","true");
$(".tfol").focus();
$("#rc").hide();
});
$("#color").on("change",function(){
var color=$("#color").val();
$(".desktop").css({
"background-image":"",
"background-color":color
});
$(".cin").css("background-color",color);
})
$("#so").click(function(){
$("#rc").hide();
$(".login").show();
})
$("#def").click(function(){
$("#rc").hide();
$(".desktop").css({
"background-image":"https://preview.ibb.co/fFDagk/windows_10_hero_4k_wallpaper_3840x2160.jpg",
"background-color":""
});
$(".cin").css("background-color","#003D73");
})
$(".tdate").html(mm+1+"/"+dd+"/"+y);
$(".ttime").html(time);
});
$(document).on("mousemove", function(e){
var x = e.pageX || e.clientX;
var y = e.pageY || e.clientY;
$("#mouse").css({
"top" : y+1+"px",
"left" : x+1+"px"
});
});
$(document).on("contextmenu",function(e){
var w = e.pageX || e.clientX;
var z = e.pageY || e.clientY;
$("#rc").show();
$("#rc").css({"top":z,"left":w});
});
alert("*Right click added\n*Rename func added\nif you are using mobile.. \n long press for access right click");
alert("password is " + passwd) ;
alert("try to create a new folder on desktop ");
</script>