Revert and relocate last-commit javascript fix