Moved inline JS here for avatar uploaders