Skip to content

夜间知乎 NightMode For Zhihu.com by qiuzaiyou

Imported from a private source

Mirrored from https://raw.githubusercontent.com/QIUZAIYOU/Stylish/main/Zhihu/zhihu.user.styl

Screenshot of 夜间知乎 NightMode For Zhihu.com

Details

Authorqiuzaiyou

LicenseGPL-3.0 License

Categoryqiuzaiyou,zhihu

Created

Updated

Size42 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

⭐1.常用页面夜间模式全覆盖 ⭐2.去除垃圾元素

Notes

⭐ 若在 Stylus 设置中开启「启用CSP补丁以使样式资源生效」选项会导致知乎加载异常

历史更新

2022

08.17 20:07:积累问题修复。

03.31 09:50:积累问题修复。

2021

05.12 11:26:小修小补。

04.25 17:13:小修小补。

01.11 11:30:小修小补。

01.05 17:49:修复搜索结果等页面未完全夜化的问题。

01.05 00:33:新增消息和私信页夜化。

2020

12.29 21:33:优化部分元素展示效果。

因为最初目的为自用,上传仅为保存,所以并未记录详细更新情况。

Source code

Source code has over 10K characters, so we truncated it. You can inspect the full source code on install link.
/* ==UserStyle==
@name           夜间知乎 NightMode For Zhihu.com
@namespace      USO Archive
@author         QIUZAIYOU
@description    ⭐1.常用页面夜间模式全覆盖 ⭐2.去除垃圾元素
@version       2024.0314
@license        GPL-3.0 License
@preprocessor   uso
==/UserStyle== */
@-moz-document url-prefix("http://example.com") {
	/*=== 
    * © 版权信息
    * © 自用,上传只为保存
    * © 作者:QIUZAIYOU 
    * © 最后更新:2024.0314
    * © Github项目地址:https://github.com/QIUZAIYOU/Stylish
    * © Gitee项目地址:https://gitee.com/aiideai/Stylish
    * © UserStyles.world项目地址:https://userstyles.world/style/242/nightmode-for-zhihu-com
    ===*/
}
@-moz-document domain("zhihu.com") {
	/* ===通用属性=== */
	:root {
		--color-00: #000 !important;
		--color-14: #141414 !important;
		--color-1b: #1b1b1b !important;
		--color-21: #212121 !important;
		--color-24: #242424 !important;
		--color-27: #272727 !important;
		--color-2c: #2c2c2c !important;
		--color-37: #373737 !important;
		--color-42: #424242 !important;
		--color-44: #444 !important;
		--color-66: #666 !important;
		--color-6d: #6d6d6d !important;
		--color-77: #777 !important;
		--color-7c: #7c7c7c !important;
		--color-86: #868686 !important;
		--color-af: #afafaf !important;
		--color-cc: #ccc !important;
		--color-ff: #fff !important;
		--color-e43: #e43 !important;
		--zhihu-blue: #0084ff !important;
		--zhihu-lightblue: #2b94ff !important;
		--aifa-blue: #3072f6 !important;
		--zhihu-orange: #ff9500 !important;
		--zhihu-yellow: #c2a469 !important;
		--zhihu-green: #2db370 !important;
		--bodr-42: 1px solid #424242 !important;
		--filter-ff-86: invert(50%) sepia(12%) saturate(0%) hue-rotate(202deg) brightness(103%) contrast(94%) !important;
	}
}
@-moz-document url-prefix("https://www.zhihu.com/"), url-prefix("http://www.zhihu.com/"), url-prefix("https://zhuanlan.zhihu.com/") {
	/*=== 垃圾元素屏蔽 ===*/
	.AdblockBanner, div[data-za-detail-view-path-module_name="相关推荐"], .HoverCard--isLoading, .SignFlowHomepage-downloadBtn, .Pc-card, .PlaceHolder, .Pc-feedAd-container, .Pc-word, .Question-main [class='Card'], .css-1xhm347, .css-1t6pvna {
		display: none !important;
	}
}
@-moz-document url-prefix("https://www.zhihu.com/"), url-prefix("https://zhuanlan.zhihu.com/") {
	/*=== 基本样式调整 ===*/
	::-webkit-scrollbar {
		width: 6px !important;
		height: 6px !important;
	}
	::-webkit-scrollbar-track-piece {
		background-color: var(--color-14) !important;
		border-radius: 0 !important;
		-webkit-border-radius: 0 !important;
	}
	::-webkit-scrollbar-thumb:vertical {
		height: 5px !important;
		background-color: var(--zhihu-blue) !important;
		border-radius: 6px !important;
	}
	::-webkit-scrollbar-thumb:horizontal {
		width: 5px !important;
		background-color: var(--zhihu-blue) !important;
		border-radius: 6px !important;
	}
	::-webkit-scrollbar-corner {
		background-color: var(--color-14) !important;
		border-radius: 0 !important;
	}
	input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
		color: var(--color-86) !important;
	}
	input:-moz-placeholder, textarea:-moz-placeholder {
		color: var(--color-86) !important;
	}
	input::-moz-placeholder, textarea::-moz-placeholder {
		color: var(--color-86) !important;
	}
	input:-ms-input-placeholder, textarea:-ms-input-placeholder {
		color: var(--color-86) !important;
	}
	body, .explore-tab .tab-navs .tab-nav.active > a, .modal-dialog-title, .zm-meta-panel, .SignContainer-switch, .VagueImage, .VagueImage-mask:before, .FeedbackForm-canvasContainer-mrde, a.toggle-expand, .QuestionWaiting-typesTopper, .Post-content, .VoteButton, div[class*="Header-module-body-"], div[class*="ContentItem-module-typeTag-"], .QuestionRelatedCard, .PostItem, .PagingButton, .AnswerItem-statusContent, .QuestionType--active, .UserPageItem, .UserPageItem .UserPageItem-link, .css-14wm9dx, .MobileAppHeader + .Sticky--holder, .KfeCollection-PcCollegeCard-type, .ErrorPage, .css-12yl4eo, .signQr-container, .css-1o2gsjy, .SignContainer-content input, .Login-options, .SignContainer-tip, .css-16h0l39, .css-1ggwojn, .Post-NormalMain .RichContent-actions, .Post-NormalMain .RichContent-actions.is-fixed .ContentItem-actions, .css-kt4t4n, .css-10wc74s, .Register-content .SignFlow-smsInputErrorMessage, .SignFlowInput-errorMask, .ContentItem-actions, .css-97fdvh, .css-1e7fksk {
		background: var(--color-21) !important;
		-webkit-tap-highlight-color: rgba(26, 26, 26, 0);
	}
	.QuestionAnswer-content .ContentItem-actions, .Card .ContentItem-actions, .zu-top, html.no-touchevents .tab-navs .tab-nav.active > a:hover, .AppHeader, .Card, .ProfileHeader-wrapper, .UserAvatar, .QuestionHeader, .QuestionHeader-footer, .Popover-content, .Popover-arrow:after, .Topbar, .Modal-inner, .CommentsV2-footer, .CornerButton, .zh-backtotop .btn-action, html.no-touchevents .tab-navs .tab-nav > a:hover, .zm-item-vote-count, .topics-plaza, div[class*="_CommentForm_bordered_"], .modal-dialog, .SettingsMain-mainColumn, .SettingsFAQ, .ExpandableField-titleView, .ExpandableField, .Switch:after, .NestComment, .CommentsV2, .Menu-item, .PushNotifications-item, .UserCover, .UserCoverEditor-action, .UploadPicture-wrapper, .UserCoverEditor, .ProfileHeader-userCover, .HoverCard-loading, .SearchTabs, div[class*="Modal-modal-"], .zm-votebar .up, .zm-votebar .down, .ac-renderer, .zu-autocomplete-row-label, .ac-row.zu-autocomplete-row-search-link, .ExploreSpecialCard, .ExploreHomePage-ContentSection-moreButton a, .ExploreRoundtableCard, .ExploreCollectionCard, .ExploreColumnCard, .SignFlowHomepage-downloadBtn, .QuestionWaiting-types, .TooltipContent, .TooltipContent-arrow:after, .RichContent-actions.is-fixed, .ColumnPageHeader, div[class*="-module-root-"], .Recommendations-Main, .zg-form-text-input, .zg-form-select, textarea, .FeedbackButton-button-3waL, .Messages-newItem, .Input-wrapper.Input-wrapper--spread, .ActionMenu, .ActionMenu-item:hover, .Emoticons, .EmoticonsFooter-items, .Sticky.RichContent-actions .VoteButton, .css-1xki3l2, .css-1pk3pp1, .ZVideoLinkCard-info, .Question-mainColumnLogin, .css-ul9l2m, .css-1bwzp6r, .MobileAppHeader, .css-i6cwu4, .css-qedy2f, .css-plopmd, .css-7j3byf, .css-pxupqe, .css-u6lvao, .css-u6lvao:after, .css-u6lvao:before, .css-plopmd:before, .css-plopmd:after, .css-148dlpw, .css-17cflso, .MobileAppHeader-expand, .SpecialListPage-header, .SpecialListCard, .ExploreHomePage-specialsLogin, .Notifications-Section-header, .NotificationList, .ChatWrapper .Chat, .ChatBox .Input-wrapper--multiline .Input, .ChatSideBar-Search, .KfeCollection-PcCollegeCard-root, .KfeCollection-PcCollegeCard-wrapper, .SearchResult-Card .SearchTopicHeader-IntroTail, #Popover9-toggle, .topic-pages .topic-avatar .zm-entry-head-avatar-link, .topic-feed-page .topic-avatar .zm-entry-head-avatar-link, #TopicMain .Topic-bar, .Topic-bar, .popover .popover-content, .SignFlowHomepage .css-zvnmar, .BottomInfo, .SearchTopicHeader-IntroTail, .LinkCard.new, .css-1sclke5-Label, .css-16xodth-PopoverContent, [data-tooltip="推荐"], [data-tooltip="不推荐"], .css-b2yyne, .CommentListV2-dividerText, .css-1aryoh2, .css-t9mabs, .css-lmp90m, .css-1f0lroi, .css-ovbogu, .css-jpzy4w, .Catalog-FirstLevelTitle::before, .Catalog-SecondLevelTitle::before, .css-q9wt1v:hover, .GoodsRecommendCard, .Topstory-newUserFollowCountPanel, .HotItem, .css-ysn1om, .css-1hwwfws, .css-p7qmtz, .css-dpj044, .AskTitle-input .Input:not(input), .Modal-footer, .Editable-toolbar, .css-1hnxfhy, .css-xqep55, .css-1j5d3ll, .css-1vtgv04, .css-1izy64v, .Modal-inner, .css-ousx6v button:hover, .css-ousx6v a:hover, .Login-socialButton, .css-v6yqll, .css-h9ndtl, .css-805ti0, .css-1ujtx97, .ZVideoRecommendationSkeleton-thumbnail, .ZVideoRecommendationSkeleton-avatar, .ZVideoRecommendationSkeleton-meta:after, .ZVideoRecommendationSkeleton-title:after, .ZVideoRecommendationSkeleton-title:before, .Comments-container .css-805ti0, .RichContent-inner .css-1fu5tqj, .CatalogModal .css-c29erj, .Catalog .css-wgpue5, .css-lwqo8e:hover, .css-erb3u4:hover, .css-jd7qm7, .css-11v6bw0, .css-1wi7vwy, .css-i9srcr, .css-1e6hvbc, .Catalog-SecondLevelTitle > div:hover, .css-1hrberl, .css-m0zh86, .css-127i0sx, .css-yoby3j, .FollowButton.Button--grey {
		background: var(--color-2c) !important;
	}
	.Tag, .TopicTag .Tag, .css-1k01q48, .MCNLinkCard, .LinkCard.new, .LinkCard.new:hover, .VideoAnswerPlayer-stateBar, .css-1k7a5k5, .css-11awxyw, .css-1viljnl, .RichText .lazy[data-lazy-status], .css-1iyxdkz, .css-x7xsnd, .ecommerce-ad-arrow, .css-4em6pe table[data-draft-type='table'] th, .css-9djmbp, .css-1j8bif6, .RichContent-cover-inner.RichContent-cover--normal .css-mfnelk, .css-oox7m3, .css-319aom, .Button--secondary.Button--grey, .css-pod6hx > a:hover, .css-1ifd8ga, .css-1bi2006 {
		background: var(--color-27) !important;
	}
	.PushNotifications-item:after, .MoreAnswers .List-headerText, hr, .PushNotifications-tab:not(:last-child):after, *[class*="_CommentBox_dividerText_"], div[class*="_InputBox_root_"], .SearchItem-type, .CommentEditorV2-inputWrap, .RichContent-cover:after, .RichContent-cover, input, .SignFlow-accountSeperator, textarea[class*="FeedbackForm-inputBox-"], .CommentsV2-openComment-divider, .ColumnPageHeader-Line, div[class*="SectionBar-module-tag-"], .css-lbryw4, .BrandQuestionSymbol-divider, .NotificationList-Item.NotificationList-Item:after, .NotificationList-DateSplit.NotificationList-DateSplit:after, .ChatUserListItem:after, .ChatListGroup-SectionTitle--bottomBorder:after, .WikiBoxHotList-Line, .ProfileHeader-divider, .css-qe4lgi:nth-of-type(n + 2)::after, .Editable-toolbar-separator {
		background: var(--color-42) !important;
	}
	.Messages-footer, .Notifications-footer, .Input-wrapper.Input-wrapper--grey, .CommentListV2-header-divider, .zu-top-search-input, .VotableTopicCard, .TopicVoteCheckbox > input + label, .HoverCard, .Avatar, .Avatar--large, .HoverCard-avatar, .zm-side-nav-link.active, html.no-touchevents .zm-side-nav-link:hover, .SidebarListNav-itemLink:active, html.no-touchevents .SidebarListNav-listItem .follow-link:hover + .SidebarListNav-itemLink, html.no-touchevents .SidebarListNav-itemLink:hover, .upper, .SettingsIn...

Reviews

No reviews yet.