howdy39 / q-accelerator

Qiitaでの活動を加速させるChrome拡張機能
https://chrome.google.com/webstore/detail/q-accelerator/mheleidccioamimekojienbdfclcbaan
MIT License
62 stars 9 forks source link

ヘッダー固定機能が一部のページで動作しない #191

Closed munierujp closed 6 years ago

munierujp commented 6 years ago

自分で作っておいてなんですが、ヘッダー固定機能が一部のページで動作していません。 結構見る頻度の高いページもあるので、できれば対応したいです。

一覧

ページ URLパターン
組織一覧 https://qiita.com/organizations
https://qiita.com/organizations?*
https://qiita.com/organizations
組織(トップページ) https://qiita.com/organizations/* https://qiita.com/organizations/increments
組織(投稿) https://qiita.com/organizations/*/activities https://qiita.com/organizations/increments/activities
組織(メンバー) https://qiita.com/organizations/*/members https://qiita.com/organizations/increments/members
ユーザープロフィール(トップページ) https://qiita.com/* https://qiita.com/howdy39
ユーザープロフィール(コントリビューション) https://qiita.com/*/contributions https://qiita.com/howdy39/contributions
ユーザープロフィール(フォロワー) https://qiita.com/*/followers https://qiita.com/howdy39/followers
ユーザープロフィール(いいね) https://qiita.com/*/like https://qiita.com/howdy39/like
ユーザープロフィール(限定共有投稿) https://qiita.com/*/private https://qiita.com/howdy39/private
ユーザープロフィール(コメント) https://qiita.com/*/comments https://qiita.com/howdy39/comments
下書き一覧 https://qiita.com/drafts/* https://qiita.com/drafts/
編集リクエスト一覧 https://qiita.com/patches https://qiita.com/patches
設定 https://qiita.com/settings/* https://qiita.com/settings/account
アドベントカレンダー(トップページ) https://qiita.com/advent-calendar https://qiita.com/advent-calendar
アドベントカレンダー https://qiita.com/advent-calendar/* https://qiita.com/advent-calendar/2017
ユーザー一覧 https://qiita.com/users
https://qiita.com/users?*
https://qiita.com/users
検索 https://qiita.com/search
https://qiita.com/search?*
https://qiita.com/search?q=user%3Ahowdy39

ユーザーページの判定はURLパターンのみではできないので、コンテンツスクリプト内で判定する必要がありそうです。

howdy39 commented 6 years ago

CSS適用はhttps://qiita.com/*を指定した範囲の広いmatchesを作ったほうが良いかも。 content_scripts/all-content.jsを作って、その中でnew FixHeader().run();をするイメージ。

全ページ同じCSSだとラクそうですが難しいかな。

munierujp commented 6 years ago

CSSは3通り(トップページ、記事ページ、その他のページ)なので、all-content.jsから呼び出すFixHeader内でURLによって読み込むCSSを切り替える方式がよさそうです。

howdy39 commented 6 years ago

@munierujp Chrome WebStore にあげました。 v2.1.0 がそのうち降ってくると思います。