-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontextmenu.php
More file actions
112 lines (108 loc) · 2.67 KB
/
contextmenu.php
File metadata and controls
112 lines (108 loc) · 2.67 KB
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
<!--This page is coded by Mohammed Zahid Wadiwale and is intellectual property of Zahid Servers-->
<style>
.contextmenu{
width:230px;
height: auto;
box-shadow:0 0 20px 0 #ccc;
position:absolute;
display:none;
z-index:+3;
font-size: 15px;
background-color:white;
}
.contextmenu ul{
list-style:none;
padding:5px 5px 5px 5px;
z-index:+5;
}
.contextmenu ul li{
list-style:none;
padding:5px 0px 5px 0px;
border-left:4px solid transparent;
cursor:pointer;
z-index:+5;
}
.contextm1 {
color:black;
z-index:+5;
}
.contextm1:link {
text-decoration: none;
z-index:+5;
}
.contextm1:visited {
text-decoration: none;
z-index:+5;
}
.contextm1:hover {
text-decoration: none;
z-index:+5;
}
.contextm1:active {
text-decoration: none;
z-index:+5;
}
.contextmenu ul li:not(.sepratorcontextmenu){
list-style:none;
padding:5px 0px 5px 0px;
border-left:4px solid transparent;
cursor:pointer;
z-index:+5;
}
.contextmenu ul li:hover{
list-style:none;
padding:5px 0px 5px 0px;
border-left:4px solid #666;
cursor:pointer;
background:#eee;
z-index:+5;
}
.sepratorcontextmenu{
height:1px;
background:#dedede;
margin: 0px 0px 0px 0px;
z-index:+5;
}
</style>
<div id="contextmenu" class="contextmenu">
<ul>
<li>Site Developed by<br>Mohammed Zahid Wadiwale</li>
<li><a class ="contextm1" href="about">About US</a></li>
<li><a class ="contextm1" href="contact">Contact Us</a></li>
<li><a class ="contextm1" href="">Contact Site Developer</a></li>
<li class="sepratorcontextmenu"></li>
<li><a class ="contextm1" onclick="location.reload();">Reload Page</a></li>
<li onclick="window.open('//twitter.com/intent/tweet?text=' + window.location.href);">Share Page on Twitter</li>
<li onclick="window.open('//facebook.com/sharer/sharer.php?u=' + window.location.href);">Share on Facebook</li>
<li onclick="window.location='mailto:?body='+window.location.href;">Email This Page</li>
<li onclick-="oncopycontext();">For Copy Use CTRL+C</li>
</ul>
</div>
<script language="javascript">
window.onclick=hidecontextmenu;
window.onkeydown=listenkeyscontext;
var contextmenuheight=document.getElementById("contextmenu");
var contexteheight=contextmenuheight.offsetHeight;
var contextmenu=document.getElementById('contextmenu');
var contextdisp=window.innerHeight;
function showcontextmenu(event) {
contextmenu.style.display="block";
contextmenu.style.left=event.pageX+'px';
contextmenu.style.top=event.pageY+'px';
return false;
}
function hidecontextmenu(){
contextmenu.style.display="none";
}
function listenkeyscontext(event){
var KeyCode=event.which||event.KeyCode;
if(KeyCode==27)
{
hidecontextmenu();
}
}
function oncopycontext(){
var selObj = window.getSelection().toString();
var v=selobj;
}
</script>