Patreon responsive + customizations

Patreon website is more suitable for wide screens.

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

  1. /* ==UserStyle==
  2. @name Patreon responsive + customizations
  3. @version 1.0.12
  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. .dofSdt img {
  44. min-width: 100% !important;
  45. object-fit: cover !important;
  46. }
  47. 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) {
  48. display: flex !important;
  49. flex-basis: 100% !important;
  50. flex-direction: column !important;
  51. }
  52. img,
  53. div[elevation="subtle"] > div,
  54. .djipQD > .image-grid {
  55. display: block !important;
  56. height: auto !important;
  57. max-height: 100% !important;
  58. min-width: 100% !important;
  59. object-fit: contain !important;
  60. }
  61. img[loading="eager"] {
  62. width: auto !important;
  63. }
  64. .image-grid + .image-grid {
  65. margin-top: 2px;
  66. }
  67. .image-carousel {
  68. height: 112px;
  69. object-fit: contain;
  70. width: auto !important;
  71. }
  72. /* Little unblur */
  73. .dgyaSI {
  74. background: transparent !important;
  75. opacity: 0 !important;
  76. }
  77. .image-grid > img {
  78. background: transparent !important;
  79. object-fit: contain !important;
  80. min-width: 100% !important;
  81. }
  82. .jQZWvF > div > div,
  83. .image-grid div {
  84. display: none !important;
  85. height: 0 !important;
  86. width: 0 !important;
  87. }
  88. [data-tag="locked-badge-button"] p {
  89. padding-right: 3em;
  90. }
  91. }
  92. /* Custom font size */
  93. :root,
  94. button,
  95. div,
  96. li,
  97. p,
  98. .cLOyGt,
  99. .cuiKYE,
  100. .cQjDCC,
  101. .fxePXf,
  102. .jYEggK {
  103. font-size: fontsize !important;
  104. }
  105. .vWGl {
  106. font-size: calc(var(--fontsize) - .2rem)!important;
  107. }
  108. span > .vWGl {
  109. font-size: inherit !important;
  110. }
  111. .gxOVkK {
  112. font-size: calc(var(--fontsize) - .4rem)!important;
  113. }
  114. if nocomments {
  115. [data-tag="content-card-comment-thread-container"],
  116. .bmnjsr {
  117. display: none !important;
  118. }
  119. }
  120. if nojump {
  121. .sc-jrQzAO.bAzCwM,
  122. .sc-o4u8m1-2 > div > div:nth-child(2),
  123. [data-tag="upgrade-free-membership-button"],
  124. [data-tag="free-membership-upgrade-cta"] {
  125. display: none !important;
  126. height: 0 !important;
  127. max-height: 0 !important;
  128. }
  129. }
  130. if widemode {
  131. section.fZbiny>div,
  132. .bNdQpa,
  133. .bnFcNI,
  134. .cuHeCZ,
  135. .gSEDWh,
  136. .hGVSIy,
  137. .idaEYe,
  138. .kYRjdn,
  139. .lghRlU,
  140. .McnWk,
  141. .PSylB {
  142. max-width: 100% !important;
  143. }
  144. .gwGwhu {
  145. padding: 0;
  146. }
  147.  
  148. .bcGqVn {
  149. grid-template-columns: 80% 20%;
  150. }
  151.  
  152. .jwWBqC {
  153. grid-column-end: span 1;
  154. }
  155. .leSNuf:nth-child(odd)> .dGdDmr {
  156. flex-direction: row-reverse !important;
  157. }
  158. .sc-o4u8m1-4.hBubtn > div > div > h2 {
  159. margin-top: 1rem;
  160. }
  161. .dzWUmz,
  162. .cgDWfu {
  163. max-width: max-content !important;
  164. }
  165. }
  166. }
  167.  
  168. @-moz-document regexp("https://www\\.patreon\\.com/[^/]+/posts") {
  169. 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) {
  170. display: flex !important;
  171. flex-basis: 100% !important;
  172. flex-direction: column !important;
  173. }
  174. div[elevation="subtle"] div:nth-child(2) > div {
  175. justify-content: center;
  176. }
  177. header {
  178. height: 417px !important;
  179. }
  180. .sc-gIBqdA.hVkHgO > div > div.sc-jrQzAO.bmnjsr {
  181. padding-right: 2em;
  182. }
  183. }