-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrollsole.js
57 lines (49 loc) · 1.32 KB
/
trollsole.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
// If you want to load external html from same domain - uncomenet this function and add jQuery library
// function trollHtml(path){
// jQuery("#trollsole").load(path);
// }
// Open/Close switcher
var open = true;
function show_trolfface_console(){
if(open == true){
document.getElementById('trollface_console').style.display="block";
document.getElementsByTagName('body')[0].style.marginTop="-130px";
open = false;
soundPlay();
} else {
document.getElementById('trollface_console').style.display="none";
document.getElementsByTagName('body')[0].style.marginTop="0";
open = true;
}
}
// Play sound id exist
function soundPlay(){
var sound = document.getElementById('troll-sound');
if (sound != null){
sound.play();
} else{
// trollface
}
}
//////////F12 disable code////////////////////////
document.onkeypress = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
show_trolfface_console();
return false;
}
}
document.onmousedown = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
show_trolfface_console();
return false;
}
}
document.onkeydown = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
show_trolfface_console();
return false;
}
}