0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Stylusを使わずgoogleの検索結果に順位を表示させる

Posted at

はじめに

こんにちは。東京五輪のピクトグラムのパフォーマンスすごかったですねー!途中でがーまるちょば十八番のエスカレーターの動きがありましたね。本日ラジオで聞いたんですが、がーまるちょばも顔隠してどこかで出ていたそうです。きっとあのエスカレーターのくだりのとこ、がーまるちょばだと思います! :smile:

さて、今回はChromeの拡張機能の整理をしております。
理由は、以下の通りです。

  1. ブラウザのバーが埋め尽くされてきてまして、非常に汚い... :sob:
  2. 使いたい拡張機能を瞬時に見つけられない.. :sob:

不要な拡張機能はいねぇーかー?

なんだかんだ使えるんだよなぁ、みたいな拡張機能ってありますよね。
だから消せない..。

あれ、Stylus消せそう :thinking:

いまStylusは以下でのみ使用しております。

これを、ほかの方法で実現できればこの拡張機能は不要になります。

Stylusを使わずScriptAutoRunnerを使ってgoogleの検索結果に順位を表示させる

上記記事をScriptAutoRunnerの拡張機能に移植します。

ドメインフィルタにはwww.google.comを指定します。

スクリプトはこちら↓

(() => {
  document.querySelector('body').insertAdjacentHTML('afterend', `
    <style>
      body {
        counter-reset: result !important;
      }
      h3.LC20lb:before {
          content: counter(result) ". " !important;
          counter-increment: result !important;
          display: inline-block;
          background: #fbe4c2;
          margin-right: 1em;
      }
    </style>
  `)
})();

スクリーンショットで見るこんな感じです。

chrome-extension___gpgjofmpmjjopcogjgdldidobhmjmdbm_options.html (2).png

実行結果

scriptautorunner-Google-検索.png

おわりに

これでStylusを削除できます :v:
それでは!

0
2
0

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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?