|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 知乎美化 |
3 | | -// @version 1.5.13 |
| 3 | +// @version 1.5.14 |
4 | 4 | // @author X.I.U |
5 | 5 | // @description 宽屏显示、暗黑模式(4种)、暗黑模式跟随浏览器、屏蔽首页活动广告、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏 |
6 | 6 | // @match *://www.zhihu.com/* |
@@ -205,33 +205,43 @@ html[data-theme=light] .AppHeader-notifications:not([aria-label=通知])>div:fir |
205 | 205 | .Topstory-mainColumn, .QuestionWaiting-mainColumn {width: inherit !important;} |
206 | 206 | .Topstory-mainColumn+div,[data-za-detail-view-path-module="RightSideBar"] {display: none !important;} |
207 | 207 | .Topstory-container {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} |
| 208 | +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Topstory-container {width: 97% !important;}} |
208 | 209 | `, |
209 | 210 | style_widescreenDisplayQuestion = `/* 宽屏显示 - 问题页 */ |
210 | 211 | .Question-mainColumn, .ListShortcut, .QuestionWaiting-mainColumn {width: inherit !important;} |
211 | 212 | .Question-mainColumn+div,[data-za-detail-view-path-module="RightSideBar"], .Question-sideColumn, .GlobalSideBar {display: none !important;} |
212 | 213 | .QuestionWaiting-mainColumn {margin-right: 0 !important;} |
213 | 214 | .Question-main {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} |
| 215 | +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Question-main {width: auto !important;}} |
| 216 | +@media only screen and (max-width: ${GM_getValue('menu_widescreenDisplayWidth')-100}px) {.Question-main {width: 98.5% !important;}} |
214 | 217 | .AuthorInfo {max-width: 100% !important;} |
215 | 218 | `, |
216 | 219 | style_widescreenDisplaySearch = `/* 宽屏显示 - 搜索页 */ |
217 | 220 | .SearchMain, .ContentLayout-mainColumn, .Club-mainColumn, .Post-mainColumn, [data-za-detail-view-path-module=TopicItem]>div:first-child {width: inherit !important;} |
218 | 221 | .SearchMain+div, .ContentLayout-sideColumn, .Card.QuestionHeaderTopicMeta, .ClubSideBar, [data-za-detail-view-path-module=TopicItem]>div:not(:first-child) {display: none !important;} |
219 | 222 | .Search-container, .ContentLayout, .Club-container, .Post-container, [data-za-detail-view-path-module=TopicItem] {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} |
| 223 | +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Search-container, .ContentLayout, .Club-container, .Post-container, [data-za-detail-view-path-module=TopicItem] {width: 97.5% !important;}} |
220 | 224 | `, |
221 | 225 | style_widescreenDisplayCollection = `/* 宽屏显示 - 收藏页 */ |
222 | 226 | .CollectionsDetailPage-mainColumn {width: inherit !important;} |
223 | 227 | .CollectionsDetailPage-mainColumn+div {display: none !important;} |
224 | 228 | .CollectionsDetailPage {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} |
| 229 | +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.CollectionsDetailPage {width: 98.5% !important;}} |
225 | 230 | `, |
226 | 231 | style_widescreenDisplayPost = `/* 宽屏显示 - 文章页 */ |
| 232 | +.Post-content {min-width: auto !important;} |
227 | 233 | .Post-SideActions {left: calc(10vw) !important;} |
228 | 234 | .Post-Row-Content-right {display: none !important;} |
229 | | -.Post-Row-Content, .Post-Row-Content-left {width: ${GM_getValue('menu_widescreenDisplayWidth')}px !important;} |
| 235 | +.Post-Row-Content, .Post-Row-Content-left, .RichContent-actions {width: ${GM_getValue('menu_widescreenDisplayWidth')}px !important;} |
| 236 | +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Post-Row-Content, .Post-Row-Content-left, .RichContent-actions {width: auto !important;}} |
| 237 | +@media only screen and (max-width: ${GM_getValue('menu_widescreenDisplayWidth')-100}px) {.Post-Row-Content, .Post-Row-Content-left, .RichContent-actions {width: 98% !important;}} |
230 | 238 | `, |
231 | 239 | style_widescreenDisplayPeople = `/* 宽屏显示 - 用户主页 */ |
232 | 240 | .Profile-mainColumn {width: inherit !important;} |
233 | 241 | .Profile-mainColumn+div,[data-za-module="RightSideBar"],.Profile-sideColumn {display: none !important;} |
234 | 242 | .Profile-main, #ProfileHeader {width: ${GM_getValue('menu_widescreenDisplayWidth')}px !important;} |
| 243 | +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Profile-main, #ProfileHeader {width: auto !important;}} |
| 244 | +@media only screen and (max-width: ${GM_getValue('menu_widescreenDisplayWidth')-100}px) {.Profile-main, #ProfileHeader {width: 98.5% !important;}} |
235 | 245 | `, |
236 | 246 | style_2 = `/* 隐藏在各列表中查看文章时开头显示的大图,不影响文章、专栏页面 */ |
237 | 247 | .RichContent img.ArticleItem-image {display: none !important;} |
|
0 commit comments