The `page:change` handler is fine, but you're right that lines 111 and 112 might cause more than one trigger if another script is using the same pattern.