mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Minified version to match full
This commit is contained in:
@@ -4054,7 +4054,7 @@ var ICEcoder = {
|
||||
// Reset the auto-logout timer
|
||||
top.ICEcoder.resetAutoLogoutTimer();
|
||||
|
||||
// Detect if we type s,n,a,k,e keys, if so start snake game
|
||||
// Detect if we type s,n,a,k,e keys with content saved, if so start snake game
|
||||
if (!top.ICEcoder.last5Keys) {top.ICEcoder.last5Keys = [];}
|
||||
top.ICEcoder.last5Keys.push(key);
|
||||
if (top.ICEcoder.last5Keys.length == 6) {
|
||||
@@ -4062,7 +4062,24 @@ var ICEcoder = {
|
||||
}
|
||||
if (top.ICEcoder.last5Keys.join() == "83,78,65,75,69") {
|
||||
setTimeout(function() {
|
||||
top.ICEcoder.startSnake();
|
||||
// Undo back to pre 'snake' word
|
||||
cM = ICEcoder.getcMInstance();
|
||||
var undoCounts = 0;
|
||||
var startCG = cM.changeGeneration();
|
||||
while (cM.changeGeneration() > startCG-5) {
|
||||
cM.undo();
|
||||
undoCounts++;
|
||||
}
|
||||
// If we have content saved
|
||||
if (top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] == cM.changeGeneration()) {
|
||||
// Start snake game
|
||||
top.ICEcoder.startSnake();
|
||||
// If we don't, redo snake word
|
||||
} else {
|
||||
for (var i=1; i<=undoCounts; i++) {
|
||||
cM.redo();
|
||||
}
|
||||
}
|
||||
},0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user