使用 Darkreader.js 实现 Darkmode

This commit is contained in:
Skywt2003 2021-09-24 21:40:14 +08:00
parent b3a1e93813
commit 7519d871cd
2 changed files with 8 additions and 0 deletions

View File

@ -45,6 +45,10 @@
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.1.0/build/highlight.min.js"></script> <script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.1.0/build/highlight.min.js"></script>
<script>hljs.highlightAll();</script> <script>hljs.highlightAll();</script>
<!-- Darkreader.js via jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/darkreader@4.9.34/darkreader.min.js"></script>
<script>DarkReader.auto({brightness:100, contrast:90, sepia:10});</script>
<?php $this->header(); ?> <?php $this->header(); ?>
</head> </head>
<!--[if lt IE 8]> <!--[if lt IE 8]>

View File

@ -46,6 +46,10 @@ $this->need('functions.php'); // 不知道为啥,似乎模版页面不会自
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.1.0/build/highlight.min.js"></script> <script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.1.0/build/highlight.min.js"></script>
<script>hljs.highlightAll();</script> --> <script>hljs.highlightAll();</script> -->
<!-- Darkreader.js via jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/darkreader@4.9.34/darkreader.min.js"></script>
<script>DarkReader.auto({brightness:100, contrast:90, sepia:10});</script>
<?php $this->header(); ?> <?php $this->header(); ?>
</head> </head>
<!--[if lt IE 8]> <!--[if lt IE 8]>