[urlfragment] added method for replacing window.location.hash with a key-value-pair