["a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "aa", "as", "ad", "af", "ag", "ah", "aj", "ak", "af"..."sa", "ss", "sd"...]
["a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "aa", "as", "ad", "af", "ag", "ah", "aj", "ak", undefined]
HINTS = ["a", "s", "d", "f", "g", "h", "j", "k", "l", ";"] | |
$(document).bind "keydown", "f", -> | |
anchors = 19 # will change to $("a").length | |
allHints = -> | |
for i in [0...anchors] | |
do (i) -> | |
if i > 9 | |
(for y in [0...i % 9] | |
do (y) -> | |
#changing this to HINTS[Math.round(i / 10)] as it should be produces weird results | |
HINTS[y] + HINTS[i % 9 - 1])[0] | |
else | |
HINTS[i] | |
console.log allHints anchors |
var HINTS; | |
HINTS = ["a", "s", "d", "f", "g", "h", "j", "k", "l", ";"]; | |
$(document).bind("keydown", "f", function() { | |
var allHints, anchors; | |
anchors = 19; | |
allHints = function() { | |
var i, _results; | |
_results = []; | |
for (i = 0; 0 <= anchors ? i < anchors : i > anchors; 0 <= anchors ? i++ : i--) { | |
_results.push((function(i) { | |
var y; | |
if (i > 9) { | |
return ((function() { | |
var _ref, _results2; | |
_results2 = []; | |
for (y = 0, _ref = i % 9; 0 <= _ref ? y < _ref : y > _ref; 0 <= _ref ? y++ : y--) { | |
_results2.push((function(y) { | |
return HINTS[y] + HINTS[i % 9 - 1]; | |
})(y)); | |
} | |
return _results2; | |
})())[0]; | |
} else { | |
return HINTS[i]; | |
} | |
})(i)); | |
} | |
return _results; | |
}; | |
return console.log(allHints(anchors)); | |
}); |