How can I modify script so that the form only appears on url's matching a pattern?