Ox.load({UI: {}, Unicode: {}}, function() {
var ascii = {},
$body = Ox.UI.$body.css({overflow: 'auto'}),
$table = $('
').appendTo($body);
Ox.forEach(Ox.UNICODE_CHARACTERS, function(data, char) {
if (data.ascii) {
ascii[data.ascii] = ascii[data.ascii] || [];
ascii[data.ascii].push({char: char, names: data.names});
}
});
Ox.print(ascii);
Ox.forEach(Object.keys(ascii).sort(function(a, b) {
return a.length * 1000000 + a.charCodeAt(0)
- b.length * 1000000 - b.charCodeAt(0);
}), function(char) {
var $tr = $('').appendTo($table);
$('').html(char).appendTo($tr)
ascii[char].forEach(function(data) {
$(' | ').attr({title: data.names.join('\n')})
.html(data.char).appendTo($tr);
});
});
}); |