Vistopia_Monkey - 理想猴

一款优化Vistopia体验的油猴脚本

目前为 2023-06-11 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Vistopia_Monkey - 理想猴
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.0.3
  5. // @description 一款优化Vistopia体验的油猴脚本
  6. // @author Sherlock-V
  7. // @match https://www.vistopia.com.cn
  8. // @match https://www.vistopia.com.cn/*
  9. // @grant GM_addStyle
  10. // @run-at document-body
  11. // @license MIT
  12. // ==/UserScript==
  13. (function () {
  14. 'use strict';
  15.  
  16. // Your code here...
  17. const cssText = `
  18. .page-home, .page-home .home-content,
  19. .page-article,
  20. .page-detail .detail-content .tabs_wrap,
  21. .page-detail .detail-content .tabs_wrap .el-tabs .el-tabs__header,
  22. .page-detail {
  23. background: #000000 !important;
  24. }
  25.  
  26. .comment-list .item-wrap .articleTitle,
  27. .audioList .part-area ul .li_item {
  28. background: #141414 !important;
  29. }
  30.  
  31. #web-header {
  32. background: #1f1f1f !important;
  33. }
  34.  
  35. .comment_children .child .name {
  36. color: rgba(255, 255, 255, 0.85) !important;
  37. }
  38.  
  39. .page-article .article-content .article {
  40. color: rgba(255, 255, 255, 0.65) !important;
  41. }
  42.  
  43. .comment_children .child .replied {
  44. color: rgba(255, 255, 255, 0.45) !important;
  45. }
  46.  
  47. .page-article .article-content .article[data-v-0c3a9210] a {
  48. color: #f0dd71 !important;
  49. }
  50. `;
  51. GM_addStyle(cssText);
  52.  
  53. const style = document.createElement('style')
  54. const hides = [
  55. '#juejin > div.view-container div.sidebar.article-sidebar > ul.sidebar-bd-entry',
  56. '#juejin > div.view-container div.sidebar.article-sidebar > div.sidebar-block.wechat-sidebar-block.pure',
  57. '#juejin > div.view-container div.main-area.article-area > div.article-end > div.extension-banner',
  58. '#juejin > div.view-container li.nav-item.vip-entry',
  59. '#juejin > div.view-container ul > li.nav-item.link-item.special-activity-item',
  60. ].filter(Boolean)
  61.  
  62. style.innerHTML = [
  63. `${hides.join(',')}{ display: none !important; }`,
  64. ].join('')
  65.  
  66. document.body.appendChild(style)
  67. })();