added js functionality to new history items