・お問い合わせページ(ドメイン名/contact)でのみ発火させたい

if(document.URL.match(/contact/)){
    発火させたいjsの内容
}

特定のページでのみjsを発火させる方法 - Qiita