updating donation js for edge case page reload