zhi-hu

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

目前为 2022-03-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name zhi-hu
  3. // @namespace https://greasyfork.org/zh-CN/scripts/438709-zhi-hu
  4. // @version 0.0.3
  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: 0px;}');
  23. styleSheet.insertRule('.ZVideoItem {height: 2px;}');
  24. }
  25.  
  26. insertCSS();
  27. })();