Seems best to move this generic function into the `static/js/updates/base.js` file