LoginSignup
9
8

More than 5 years have passed since last update.

好きなサイトをダークモード化してみる。

Last updated at Posted at 2019-08-01

概要

ダークモードって良いですよね。
Darkmode.jsを使って、好きなサイトをダークモード化してみます。

使うもの

やり方

  1. ダークモードにしたいなぁというサイトをChromeで開きます。 image.png
  2. DevToolsを立ち上げます。
  3. Consoleタブを開き、以下を2回に分けて入力します。

    (script = document.createElement('script')).src = 'https://cdn.jsdelivr.net/npm/darkmode-js@1.4.0/lib/darkmode-js.min.js';
    document.getElementsByTagName('head')[0].appendChild(script);
    
    new Darkmode().showWidget();
    
  4. ダークモード化されます。(結構アレな見た目ですが)
    image.png

  5. 画面右下のダークモード切替え用のウィジェットをポチポチして、通常モードとダークモードを切り替えます。

参考

Chrome開発者ツールのコンソールでJavaScriptライブラリを読み込む - dackdive's blog

9
8
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
9
8