As many of the pages linked to from event descriptions have disappeared, it would be nice to link to an appropriate point in time in the Wayback Machine instead.
This client-side JS should do the job:
// select links in the event description
var links = document.querySelectorAll('.recommend-quote a[href]')
if (links.length) {
// this would be unnecessary if the event date was already in ISO format (ideally in a time[datetime] tag)
var eventDate = document.querySelector('h1 small').textContent
var archiveDate = new Date(eventDate).toISOString().substr(0, 10).replace(/-/g, '')
Array.prototype.forEach.call(links, function(link) {
// link to the closest available snapshot of the URL in the Wayback Machine
link.href = 'https://web.archive.org/web/' + archiveDate + '/' + link.href
})
}
As many of the pages linked to from event descriptions have disappeared, it would be nice to link to an appropriate point in time in the Wayback Machine instead.
This client-side JS should do the job: