你可以自定义 HN,使其支持暗黑模式。
5 分•作者: Skullfurious•9 个月前
基本上,你只需要在浏览器中安装 uBlock Origin,点击图标,进入设置,点击顶部的“我的过滤器”,然后粘贴以下内容。
应用并重新加载页面后,你应该会看到一个北欧风格的主题,看起来更舒服。
-------------------
```
! 页面背景变暗 + 主要文本颜色
news.ycombinator.com##body, .c00:style(background-color: #1e222a !important; color: #c8d0d9 !important;)
! 顶部橙色栏(导航/标题)
news.ycombinator.com##td[bgcolor="#ff6600"]:style(background-color: #2a2f3a !important;)
! 正文内容背景
news.ycombinator.com##[bgcolor="#f6f6ef"]:style(background-color: #1e222a !important;)
! 全黑元素背景
news.ycombinator.com##[bgcolor="#000000"]:style(background-color: #2a2f3a !important;)
! 隐藏间距行
news.ycombinator.com##tr#pagespace:style(display: none !important;)
! Hacker News 标题链接
news.ycombinator.com##b.hnname > a:style(color: #8fcadb !important;)
! 所有链接
news.ycombinator.com##a:style(color: #7fbacb !important;)
! 副文本(例如,发布者、时间)
news.ycombinator.com##.subline:style(color: #8a9c8b !important;)
! 副文本链接
news.ycombinator.com##.subline a:style(color: #7aa5a8 !important;)
! 分数 + 顶部导航栏链接
news.ycombinator.com##.score, #hnmain > tbody > tr td:last-child > span.pagetop:style(color: #d0aa55 !important;)
! 网站域名 (.sitestr)
news.ycombinator.com##.sitestr:style(color: #b56c70 !important;)
! 缩小提交页面上的文本输入框。(减少闪光)
news.ycombinator.com##textarea[name="text"]:style(width: 400px !important; height: 30px !important;)
```
-------------------
我从另一个发帖人那里得到了这个想法,并稍作修改。我不知道为什么提交页面上的文本框是固定大小的。但除了这个小问题,我发现它看起来舒服多了。
如果有人知道如何将提交框更改为不同的颜色,那就太好了。
我以为可以在 HN 上发布代码,但我似乎无法弄清楚格式。对此表示抱歉。
查看原文
Basically just have ublock origin installed in your browser, click the icon, go into the settings, click My Filters on the top, and paste the following.<p>After you apply and reload the page you should have a Nordic style theme that's a bit easier on the eyes.<p>-------------------<p><i>! Darker page background + main text color<p>news.ycombinator.com##body, .c00:style(background-color: #1e222a !important; color: #c8d0d9 !important;)<p>! Top orange bar (nav/header)<p>news.ycombinator.com##td[bgcolor="#ff6600"]:style(background-color: #2a2f3a !important;)<p>! Body content background<p>news.ycombinator.com##[bgcolor="#f6f6ef"]:style(background-color: #1e222a !important;)<p>! Full black elements background<p>news.ycombinator.com##[bgcolor="#000000"]:style(background-color: #2a2f3a !important;)<p>! Hide spacing row<p>news.ycombinator.com##tr#pagespace:style(display: none !important;)<p>! Hacker News title link<p>news.ycombinator.com##b.hnname > a:style(color: #8fcadb !important;)<p>! All links<p>news.ycombinator.com##a:style(color: #7fbacb !important;)<p>! Subtext (e.g., posted by, time)<p>news.ycombinator.com##.subline:style(color: #8a9c8b !important;)<p>! Subtext links<p>news.ycombinator.com##.subline a:style(color: #7aa5a8 !important;)<p>! Score + top navbar links<p>news.ycombinator.com##.score, #hnmain > tbody > tr td:last-child > span.pagetop:style(color: #d0aa55 !important;)<p>! Site domain (.sitestr)<p>news.ycombinator.com##.sitestr:style(color: #b56c70 !important;)<p>!Shrinks the text input box on the submit page. (Flashbang reduction)<p>news.ycombinator.com##textarea[name="text"]:style(width: 400px !important; height: 30px !important;)</i><p>-------------------<p>I got the idea from another poster and modified it a bit. I don't know why the textbox on the submit page is a locked size. But other than that little quirk I find it a lot easier on the eyes.<p>If anyone knows how to change the submission boxes to be a different color that would be nice as well.<p>I thought there was a way to post code on HN but I cannot seem to figure out the formatting. Sorry about that.