Reddit responsive + customizations

Reddit website is more suitable for wide screens.

当前为 2025-01-14 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. @name Reddit responsive + customizations
  3. @version 1.0.3
  4. @description Reddit website is more suitable for wide screens.
  5. @author BreatFR (https://breat.fr)
  6. @namespace https://gitlab.com/breatfr
  7. @homepageURL https://gitlab.com/breatfr/reddit
  8. @supportURL https://discord.gg/Q8KSHzdBxs
  9. @license AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
  10. @preprocessor stylus
  11.  
  12. @var text fontsize "Custom font size" 1.1rem
  13. @var checkbox hidemenu "Hide menu" 0
  14. @var checkbox hidesidebar "Hide sidebar" 0
  15. @var select previewtype "Preview type" {
  16. "Contain": "previewtypecontain",
  17. "Cover": "previewtypecover"
  18. }
  19. @var checkbox widemode "Wide mode" 1
  20. ==/UserStyle== */
  21.  
  22. /* === Credits ===
  23. Website https://breat.fr
  24. facebook https://www.facebook.com/breatfroff
  25. mastodon https://mastodon.social/@breat_fr
  26. telegram https://t.me/breatfr
  27. vk https://vk.com/breatfroff
  28. X (twitter) https://x.com/breatfroff
  29. === Credits === */
  30.  
  31. @-moz-document domain("reddit.com") {
  32. /* Versions */
  33. :root {
  34. --themeversion: 'Theme v1.0.3 by BreatFR (https://breat.fr)';
  35. --install1: ' usercssjs.breat.fr ';
  36. --install2: ' gitlab.com/breatfr/reddit';
  37. --support1: ' ko-fi.com/breatfr ';
  38. --support2: ' paypal.me/breat \A';
  39. }
  40.  
  41. @media screen and (min-width: 900px) {
  42. reddit-header-action-items::after {
  43. background: linear-gradient(88.55deg, rgb(255, 69, 0) 22.43%, rgb(255, 255, 255) 92.28%);
  44. background-clip: text;
  45. -webkit-background-clip: text;
  46. color: transparent;
  47. content: var(--themeversion) ' Support me: ' url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_ko-fi.png") var(--support1) url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_paypal.png") var(--support2) 'Install: ' url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_breat.fr.png") var(--install1) url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_gitlab.png") var(--install2);
  48. display: block;
  49. font-size: 1.2rem;
  50. left: 9%;
  51. pointer-events: none;
  52. position: fixed;
  53. text-align: center;
  54. top: 0;
  55. width: 100%;
  56. white-space: pre-line;
  57. }
  58. reddit-header-action-items > header > nav > div:nth-of-type(2) > div > div {
  59. left: 150px;
  60. position: absolute;
  61. }
  62. }
  63. /* Custom font size */
  64. div,
  65. li,
  66. p,
  67. span,
  68. textarea,
  69. *::placeholder {
  70. font-size: fontsize !important;
  71. }
  72. if hidemenu {
  73. #left-sidebar-container,
  74. .left-sidebar {
  75. display: none !important;
  76. width: 0px !important;
  77. }
  78. .m\\:col-start-2 {
  79. grid-column: 1 / span 2 !important;
  80. }
  81. }
  82. if hidesidebar {
  83. #right-sidebar-container {
  84. display: none !important;
  85. width: 0 !important;
  86. }
  87. .flex-grid--main-container-card.right-sidebar-m,
  88. .flex-grid--main-container-card.right-sidebar-s,
  89. .flex-grid--main-container-card.right-sidebar-xs {
  90. max-width: 100% !important;
  91. }
  92. }
  93. if hidemenu && hidesidebar {
  94. .main-container,
  95. .main-container > main {
  96. max-width: 100% !important;
  97. width: 100% !important;
  98. }
  99. }
  100. if (previewtype=="previewtypecover") {
  101. gallery-carousel img,
  102. shreddit-aspect-ratio img,
  103. shreddit-aspect-ratio video {
  104. object-fit: cover !important;
  105. }
  106. }
  107. if (previewtype=="previewtypecontain") {
  108. gallery-carousel img,
  109. shreddit-aspect-ratio img,
  110. shreddit-aspect-ratio video {
  111. object-fit: contain !important;
  112. }
  113. }
  114. if widemode {
  115. .flex-grid--main-container-card.right-sidebar-m,
  116. .flex-grid--main-container-card.right-sidebar-s,
  117. .flex-grid--main-container-card.right-sidebar-xs {
  118. max-width: calc(100% -(1.5rem + 316px));
  119. }
  120. #subgrid-container {
  121. overflow-x: hidden;
  122. }
  123. .m\\:w-\\[1120px\\] {
  124. max-width: 100% !important;
  125. width: 100%;
  126. }
  127. .m\\:px-lg {
  128. padding-left: 1rem;
  129. padding-right: 1rem;
  130. }
  131. }
  132. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址