LoginSignup
0

More than 5 years have passed since last update.

View Customize pluginを特定のプロジェクトのみに適用する

Last updated at Posted at 2019-02-05

View Customize pluginではまったのでメモします。
プロジェクト"test"のみにJavaScriptを適用したいときの書き方例です。

パスのパターン:/issues
挿入位置   :全てのページのヘッダ
種別     :JavaScript
コード

$(function() {
 if ($('body').hasClass('project-test')) {
  # 任意の処理
 }
})

if文をfunction内に入れるのがキモみたいでした。

参考:View customize pluginを使いこなす

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0