Make the hash change plugin a function.