zhi-hu

知知乎乎(收藏夹双列;隐藏视频回答;)

当前为 2023-03-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name zhi-hu
  3. // @namespace https://greasyfork.org/zh-CN/scripts/438709-zhi-hu
  4. // @version 0.0.9
  5. // @description 知知乎乎(收藏夹双列;隐藏视频回答;)
  6. // @author Song
  7. // @match *://www.zhihu.com/*
  8. // @license MIT
  9. // @grant none
  10. // ==/UserScript==
  11. (function () {
  12. /**
  13. * 插入样式表
  14. */
  15. function insertCSS() {
  16. let styleSheet = document.styleSheets[document.styleSheets.length - 1];
  17. /*收藏栏的样式,变成双列*/
  18. styleSheet.insertRule('.Modal--large.FavlistsModal {width: 600px;}');
  19. styleSheet.insertRule('.Favlists-content .Favlists-item {width: 230px; float: left;}');
  20. styleSheet.insertRule(' .Favlists-content .Favlists-item:nth-child(even){margin-left: 60px;}');
  21. /*隐藏视频回答*/
  22. styleSheet.insertRule('.VideoAnswerPlayer .VideoAnswerPlayer-video {height: 2px;}');
  23. // styleSheet.insertRule('.ZVideoItem {height: 2px;}');
  24. styleSheet.insertRule('.ContentItem.ZVideoItem {height: 8px;}');
  25. styleSheet.insertRule('.ContentItem.EduSectionItem {height: 8px;}');
  26. styleSheet.insertRule('.ZvideoItem .RichContent-cover{ height:8px; }');
  27. styleSheet.insertRule('.ZvideoItem .RichContent-cover-inner{height:4px; }');
  28.  
  29. /*视频*/
  30. styleSheet.insertRule('.ZVideoItem .RichContent{opacity: 0.5; color: #666 !important; font-style:italic !important;}');
  31.  
  32. /*调整列表中专栏文章的样式*/
  33. styleSheet.insertRule('.ContentItem[itemprop=article]{opacity: 0.5; color: #666;font-style:italic;}');
  34. styleSheet.insertRule('.ContentItem[itemprop=article] .ContentItem-title{color: #666; }');
  35.  
  36.  
  37. }
  38.  
  39. insertCSS();
  40. })();