Compare commits
No commits in common. "master" and "531cf3d" have entirely different histories.
|
@ -1,6 +1,6 @@
|
|||
# Cookie-Clicker-Source-Code
|
||||
2.052 source code for... educational purposes... <br>
|
||||
Download and Extract to delete free time. Or just use the website. <br> <br>
|
||||
# Cookie-Clicker-Source-Code-Beta
|
||||
2.019 source code for... educational purposes... BETA edition! <br>
|
||||
Download and Extract to delete free time.. BETA EDITION! Or just use the website. <br> <br>
|
||||
Do not worry, I will be updating this to be up to date with the current Cookie Clicker version. <br>
|
||||
<!-- Well guess what, 2.021 came out... what happened to 2.020?? -->
|
||||
<!-- You may be saying in confusion to yourself, "2.019 beta isn't out!" Well guess what, I made it beta, Deal with it. -->
|
||||
Credits obviously go Orteil, visit the official website here: http://orteil.dashnet.org/cookieclicker/
|
||||
|
|
10
ajax.js
|
@ -1,6 +1,6 @@
|
|||
function ajax(url,callback){
|
||||
var ajaxRequest;
|
||||
try{ajaxRequest = new XMLHttpRequest();} catch (e){try{ajaxRequest=new ActiveXObject('Msxml2.XMLHTTP');} catch (e) {try{ajaxRequest=new ActiveXObject('Microsoft.XMLHTTP');} catch (e){alert("Something broke!");return false;}}}
|
||||
if (callback){ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){callback(ajaxRequest.responseText);}}}
|
||||
ajaxRequest.open('GET',url+'&nocache='+(new Date().getTime()),true);ajaxRequest.send(null);
|
||||
function ajax(url,callback){
|
||||
var ajaxRequest;
|
||||
try{ajaxRequest = new XMLHttpRequest();} catch (e){try{ajaxRequest=new ActiveXObject('Msxml2.XMLHTTP');} catch (e) {try{ajaxRequest=new ActiveXObject('Microsoft.XMLHTTP');} catch (e){alert("Something broke!");return false;}}}
|
||||
if (callback){ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){callback(ajaxRequest.responseText);}}}
|
||||
ajaxRequest.open('GET',url+'&nocache='+(new Date().getTime()),true);ajaxRequest.send(null);
|
||||
}
|
284
base64.js
|
@ -1,142 +1,142 @@
|
|||
/**
|
||||
*
|
||||
* Base64 encode / decode
|
||||
* http://www.webtoolkit.info/
|
||||
*
|
||||
**/
|
||||
|
||||
var Base64 = {
|
||||
|
||||
// private property
|
||||
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
// public method for encoding
|
||||
encode : function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = Base64._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output +
|
||||
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
|
||||
}
|
||||
|
||||
return output;
|
||||
},
|
||||
|
||||
// public method for decoding
|
||||
decode : function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
output = Base64._utf8_decode(output);
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
// private method for UTF-8 encoding
|
||||
_utf8_encode : function (string) {
|
||||
string = string.replace(/\r\n/g,"\n");
|
||||
var utftext = "";
|
||||
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
|
||||
var c = string.charCodeAt(n);
|
||||
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
}
|
||||
else if((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return utftext;
|
||||
},
|
||||
|
||||
// private method for UTF-8 decoding
|
||||
_utf8_decode : function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
|
||||
while ( i < utftext.length ) {
|
||||
|
||||
c = utftext.charCodeAt(i);
|
||||
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
}
|
||||
else if((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i+1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
}
|
||||
else {
|
||||
c2 = utftext.charCodeAt(i+1);
|
||||
c3 = utftext.charCodeAt(i+2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Base64 encode / decode
|
||||
* http://www.webtoolkit.info/
|
||||
*
|
||||
**/
|
||||
|
||||
var Base64 = {
|
||||
|
||||
// private property
|
||||
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
// public method for encoding
|
||||
encode : function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = Base64._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output +
|
||||
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
|
||||
}
|
||||
|
||||
return output;
|
||||
},
|
||||
|
||||
// public method for decoding
|
||||
decode : function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
output = Base64._utf8_decode(output);
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
// private method for UTF-8 encoding
|
||||
_utf8_encode : function (string) {
|
||||
string = string.replace(/\r\n/g,"\n");
|
||||
var utftext = "";
|
||||
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
|
||||
var c = string.charCodeAt(n);
|
||||
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
}
|
||||
else if((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return utftext;
|
||||
},
|
||||
|
||||
// private method for UTF-8 decoding
|
||||
_utf8_decode : function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
|
||||
while ( i < utftext.length ) {
|
||||
|
||||
c = utftext.charCodeAt(i);
|
||||
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
}
|
||||
else if((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i+1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
}
|
||||
else {
|
||||
c2 = utftext.charCodeAt(i+1);
|
||||
c3 = utftext.charCodeAt(i+2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 25 KiB |
BIN
img/BGgarden.jpg
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 18 KiB |
BIN
img/BGmarket.jpg
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 779 B After Width: | Height: | Size: 820 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 42 KiB |
BIN
img/bank.png
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 501 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
img/bgBW.jpg
Before Width: | Height: | Size: 69 KiB |
BIN
img/bgBlack.jpg
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 28 KiB |
BIN
img/bgBlue.jpg
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 60 KiB |
BIN
img/bgCandy.jpg
Before Width: | Height: | Size: 100 KiB |
BIN
img/bgChoco.jpg
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 66 KiB |
BIN
img/bgCoarse.jpg
Before Width: | Height: | Size: 79 KiB |
BIN
img/bgFoil.jpg
Before Width: | Height: | Size: 189 KiB |
BIN
img/bgGold.jpg
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 72 KiB |
BIN
img/bgMint.jpg
Before Width: | Height: | Size: 79 KiB |
BIN
img/bgMoney.jpg
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 69 KiB |
BIN
img/bgPaint.jpg
Before Width: | Height: | Size: 95 KiB |
BIN
img/bgPink.jpg
Before Width: | Height: | Size: 70 KiB |
BIN
img/bgPurple.jpg
Before Width: | Height: | Size: 92 KiB |
BIN
img/bgRed.jpg
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 32 KiB |
BIN
img/bgSilver.jpg
Before Width: | Height: | Size: 92 KiB |
BIN
img/bgSky.jpg
Before Width: | Height: | Size: 87 KiB |
BIN
img/bgSnowy.jpg
Before Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 58 KiB |
BIN
img/bgStars.jpg
Before Width: | Height: | Size: 61 KiB |
BIN
img/bgWhite.jpg
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 971 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 36 KiB |
BIN
img/bunnies.png
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 713 B |
Before Width: | Height: | Size: 774 B |
BIN
img/contract.png
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 29 KiB |
BIN
img/cortex.png
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 616 B |
BIN
img/cursor.png
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 97 KiB |
BIN
img/discord.png
Before Width: | Height: | Size: 1.4 KiB |
BIN
img/dragon.png
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 5.3 KiB |
BIN
img/dragonBG.png
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1010 B |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.9 KiB |
BIN
img/factory.png
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 477 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
img/farm.png
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 765 B |
BIN
img/farmIcon.png
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 944 B |
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
img/filler.png
Before Width: | Height: | Size: 98 B After Width: | Height: | Size: 953 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 1002 B |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 682 B After Width: | Height: | Size: 751 B |
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 762 B |
BIN
img/glint.png
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.0 KiB |
BIN
img/grandma.png
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |