-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.js
33 lines (31 loc) · 936 Bytes
/
scripts.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
function open_modal(id){
var e = document.getElementById('modal');
var f = document.getElementById('modalinside');
if(e.style.visibility=="hidden" || e.style.visibility==""){
e.style.visibility = "visible";
// window.scrollTo(0,0);
e.style.position="fixed";
f.className += " animated slideInDown";
}
else{
e.style.visibility = "hidden";
f.className = "";
}
}
function CopyToClipboard(id){
var f = document.getElementById('modalinside');
f.className="";
f.className += " animated shake";
if(document.selection){
var range = document.body.createTextRange();
range.moveToElementText(document.getElementById(id));
range.select().createTextRange();
document.execCommand("Copy");
}
else if(window.getSelection){
var range = document.createRange();
range.selectNode(document.getElementById(id));
window.getSelection().addRange(range);
document.execCommand("Copy");
}
}