The latest link missing in the list is fine, as you said the script considers only history passages. Never mind, in my previous comment I mistook the missing latest passage link as whole inconsistency. My mistake.
I think this script/macro could be also useful also for others Sucarcube users, so thank you very much. Here's a little customization of this macro, in order to add custom css classes to each list elements:
Macro.add('historylist', {
skipArgs: true,
handler: function() {
if (State.length < 2) {
return;
} // Custom debug view setup.
if (Config.debug) {
this.debugView.modes({
block: true
});
}
var moments = State.history.slice(0, State.activeIndex);
var ul = document.createElement('ul');
ul.className = 'css class for ul';
moments.forEach(function(m, i) {
var li = document.createElement('li');
li.className = 'css class for li';
var a = document.createElement('a');
a.className = 'css class for anchor';
jQuery(li).append(jQuery(a).ariaClick({
one: true
}, (function(idx) {
return function() {
Engine.goTo(idx);
};
})(i)).text(m.title)).appendTo(ul);
});
this.output.appendChild(ul);
}
});