Not a module, but still better than nothing. Note that some parts of the script are theme-aware.
This goes to the bottom of node--[type].tpl.php:
<?php if ($page): ?>
<script type="text/javascript">updateRecentlyVisited();</script>
<?php endif; ?>
This to the new block (block's text format shouldn't change tags):
<script type="text/javascript">
var thisBlock = document.getElementById('[PUT BLOCK ID HERE]');
if (currentlyStored) {
var recentlyVisited = '<ul">';
for (var i = 0; i < currentlyStored.length; i++) {
recentlyVisited += '<li><a href="' + currentlyStored[i][0] + '">' + currentlyStored[i][1] + '</a></li>';
}
recentlyVisited += '</ul>';
thisBlock.innerHTML = recentlyVisited;
}
else
thisBlock.remove();
</script>
And the script.js to attach in theme.info
var currentlyStored = JSON.parse(localStorage.getItem('recentlyVisited'));
function updateRecentlyVisited() {
var maxLinks = 20;
var currentPage = new Array (document.URL, document.getElementsByClassName('node-title').item(0).textContent);
if (currentlyStored)
for (var i = 0; i < currentlyStored.length; i++) {
if (currentlyStored[i][0] == currentPage[0]) {
currentlyStored.splice([i],1);
break;
}
}
else
currentlyStored = new Array();
currentlyStored.unshift(currentPage);
if (currentlyStored.length > maxLinks)
currentlyStored.pop();
localStorage.setItem('recentlyVisited', JSON.stringify(currentlyStored));
}