Patreon responsive + customizations

Patreon website is more suitable for wide screens.

当前为 2024-06-28 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. @name Patreon responsive + customizations
  3. @version 1.0.11
  4. @description Patreon 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/patreon
  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 checkbox bigimages "Big images" 1
  13. @var text fontsize "Custom font size" 1.2rem
  14. @var checkbox nojump "No Jump to level up" 1
  15. @var checkbox nocomments "No comments" 0
  16. @var checkbox widemode "Wide mode" 1
  17. ==/UserStyle== */
  18.  
  19. /* === Credits ===
  20. Website https://breat.fr
  21. facebook https://www.facebook.com/breatfroff
  22. mastodon https://mastodon.social/@breat_fr
  23. telegram https://t.me/breatfr
  24. vk https://vk.com/breatfroff
  25. X (twitter) https://x.com/breatfroff
  26. === Credits === */
  27. @-moz-document domain("patreon.com") {
  28. :root {
  29. --fontsize: fontsize;
  30. }
  31. /* Loved */
  32. [data-tag="like-button"][aria-checked="true"] > div > svg path {
  33. fill: #c6374d;
  34. }
  35. /* No double scrollbar */
  36. #__next > .sc-uiqay7-0.cnwZin {
  37. overflow: hidden;
  38. }
  39. if bigimages {
  40. * {
  41. aspect-ratio: auto !important;
  42. }
  43. header {
  44. height: 417px !important;
  45. }
  46. .dofSdt img {
  47. min-width: 100% !important;
  48. object-fit: cover !important;
  49. }
  50. div[elevation="subtle"] div:not([data-tag="post-details"] div,[data-tag="content-card-comment-thread-container"] div,div[width="fluid"] div,[data-tag="locked-badge-button"] div) {
  51. display: flex !important;
  52. flex-basis: 100% !important;
  53. flex-direction: column !important;
  54. }
  55. img,
  56. div[elevation="subtle"] > div,
  57. .djipQD > .image-grid {
  58. display: block !important;
  59. height: auto !important;
  60. max-height: 100% !important;
  61. min-width: 100% !important;
  62. object-fit: contain !important;
  63. }
  64. img[loading="eager"] {
  65. width: auto !important;
  66. }
  67. .image-grid + .image-grid {
  68. margin-top: 2px;
  69. }
  70. .image-carousel {
  71. height: 112px;
  72. object-fit: contain;
  73. width: auto !important;
  74. }
  75. /* Little unblur */
  76. .dgyaSI {
  77. background: transparent !important;
  78. opacity: 0 !important;
  79. }
  80. .image-grid > img {
  81. background: transparent !important;
  82. object-fit: contain !important;
  83. min-width: 100% !important;
  84. }
  85. .jQZWvF > div > div,
  86. .image-grid div {
  87. display: none !important;
  88. height: 0 !important;
  89. width: 0 !important;
  90. }
  91. [data-tag="locked-badge-button"] p {
  92. padding-right: 3em;
  93. }
  94. }
  95. /* Custom font size */
  96. :root,
  97. button,
  98. div,
  99. li,
  100. p,
  101. .cLOyGt,
  102. .cuiKYE,
  103. .cQjDCC,
  104. .fxePXf,
  105. .jYEggK {
  106. font-size: fontsize !important;
  107. }
  108. .vWGl {
  109. font-size: calc(var(--fontsize) - .2rem)!important;
  110. }
  111. span > .vWGl {
  112. font-size: inherit !important;
  113. }
  114. .gxOVkK {
  115. font-size: calc(var(--fontsize) - .4rem)!important;
  116. }
  117. if nocomments {
  118. [data-tag="content-card-comment-thread-container"],
  119. .bmnjsr {
  120. display: none !important;
  121. }
  122. }
  123. if nojump {
  124. .sc-jrQzAO.bAzCwM,
  125. .sc-o4u8m1-2 > div > div:nth-child(2),
  126. [data-tag="upgrade-free-membership-button"],
  127. [data-tag="free-membership-upgrade-cta"] {
  128. display: none !important;
  129. height: 0 !important;
  130. max-height: 0 !important;
  131. }
  132. }
  133. if widemode {
  134. section.fZbiny>div,
  135. .bNdQpa,
  136. .bnFcNI,
  137. .cuHeCZ,
  138. .gSEDWh,
  139. .hGVSIy,
  140. .idaEYe,
  141. .kYRjdn,
  142. .lghRlU,
  143. .McnWk,
  144. .PSylB {
  145. max-width: 100% !important;
  146. }
  147. .gwGwhu {
  148. padding: 0;
  149. }
  150.  
  151. .bcGqVn {
  152. grid-template-columns: 80% 20%;
  153. }
  154.  
  155. .jwWBqC {
  156. grid-column-end: span 1;
  157. }
  158. .leSNuf:nth-child(odd)> .dGdDmr {
  159. flex-direction: row-reverse !important;
  160. }
  161. .sc-o4u8m1-4.hBubtn > div > div > h2 {
  162. margin-top: 1rem;
  163. }
  164. .dzWUmz,
  165. .cgDWfu {
  166. max-width: max-content !important;
  167. }
  168. }
  169. }
  170.  
  171. @-moz-document regexp("https://www\\.patreon\\.com/[^/]+/posts") {
  172. div[elevation="subtle"] div:not(div:nth-child(2)>div,[data-tag="post-details"] div,[data-tag="content-card-comment-thread-container"] div,div[width="fluid"] div,[data-tag="locked-badge-button"] div) {
  173. display: flex !important;
  174. flex-basis: 100% !important;
  175. flex-direction: column !important;
  176. }
  177. div[elevation="subtle"] div:nth-child(2) > div {
  178. justify-content: center;
  179. }
  180. .sc-gIBqdA.hVkHgO > div > div.sc-jrQzAO.bmnjsr {
  181. padding-right: 2em;
  182. }
  183. }