1
1

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.

真・強制ダークモード

Last updated at Posted at 2021-04-17

右目が疼く...

BookMarklet作る

素人は手を出しづらいからかこんなに便利なのにあまり使っている人がいない。
セキュリティ懸念なのか。単に知らないのか

強制ダークモード

いまさらながらダークモード対応に入門したより

javascript:(function(){ document.body.style.filter="invert(100%) hue-rotate(180deg)"; })()

ただ、上記ページでも言われている通り、画像が反転する。実用的ではないですね。

真・強制ダークモード

javascript:(function(){const COLOR="#c5cddb",BG_COLOR="#171923";let elm=document.querySelectorAll("body,div,span,h1,h2,h3,h4,h5,h6,p,pre,a");Object.keys(elm).forEach(function(i){elm[i].style.cssText=`transition:all 150ms;color:${COLOR};background-Color:${BG_COLOR}`;});})()

ぼちぼち使えます。右目にも優しい。

###Before
before.png

###After
after.png

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?