updates script to work with new historyjs api