Closed munierujp closed 6 years ago
CSS適用はhttps://qiita.com/*
を指定した範囲の広いmatches
を作ったほうが良いかも。
content_scripts/all-content.js
を作って、その中でnew FixHeader().run();
をするイメージ。
全ページ同じCSSだとラクそうですが難しいかな。
CSSは3通り(トップページ、記事ページ、その他のページ)なので、all-content.js
から呼び出すFixHeader
内でURLによって読み込むCSSを切り替える方式がよさそうです。
@munierujp Chrome WebStore にあげました。 v2.1.0 がそのうち降ってくると思います。
自分で作っておいてなんですが、ヘッダー固定機能が一部のページで動作していません。 結構見る頻度の高いページもあるので、できれば対応したいです。
一覧
https://qiita.com/organizations
https://qiita.com/organizations?*
https://qiita.com/organizations/*
https://qiita.com/organizations/*/activities
https://qiita.com/organizations/*/members
https://qiita.com/*
https://qiita.com/*/contributions
https://qiita.com/*/followers
https://qiita.com/*/like
https://qiita.com/*/private
https://qiita.com/*/comments
https://qiita.com/drafts/*
https://qiita.com/patches
https://qiita.com/settings/*
https://qiita.com/advent-calendar
https://qiita.com/advent-calendar/*
https://qiita.com/users
https://qiita.com/users?*
https://qiita.com/search
https://qiita.com/search?*
ユーザーページの判定はURLパターンのみではできないので、コンテンツスクリプト内で判定する必要がありそうです。