forked from Sushi8756/Cookie-Clicker-Source-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
keybinds.js
37 lines (37 loc) · 1.19 KB
/
keybinds.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
window.one = 0;
window.two = 0;
window.three = 0;
function Sorry() {
Game.Notify('You can\'t enable another add-on (except of Cookie Crate). Sorry.');
}
function Press(e) {
var l = String.fromCharCode(e.which).toLowerCase();
if (l == 'm' || l == '%D1%8C') {
Game.ShowMenu('prefs');
} else if (l == 'f') {
Game.ShowMenu('fc_menu');
} else if (l == 's' || l == '%D1%8B') {
Game.ShowMenu('stats');
} else if (l == 'u' || l == '%D0%B3') {
Game.ShowMenu('log');
} else if (l == 'f' || l == '%D0%B0') {
if (window.one === 0) {
var js = document.createElement('script');
js.setAttribute('type', 'text/javascript');
js.setAttribute('id', 'frozenCookieScript');
js.setAttribute('src', 'https://icehawk78.github.io/FrozenCookies/frozen_cookies.js');
document.head.appendChild(js);
window.one = 'f';
} else if (window.one != 'f') {
Sorry();
} else {
Game.ShowMenu('fc_menu');
}
} else if (l == 'c' || l == '%D1%81') {
if (window.one === 0) {
Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonster.js');
window.one = 'c';
} else if (window.one != 'c') {Sorry();}
}
}
document.onkeypress = Press; Game.Notify('Shortcuts enabled');