Patreon responsive + customizations

Patreon website is more suitable for wide screens.

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

  1. /* ==UserStyle==
  2. @name Patreon responsive + customizations
  3. @version 1.1.3
  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. /* Custom font size */
  40. :root,
  41. button,
  42. div,
  43. input,
  44. label,
  45. [data-tag*="settings"],
  46. li,
  47. p,
  48. p span,
  49. [data-tag="chats-send-message-form"] textarea,
  50. .cuiKYE,
  51. .cQjDCC,
  52. .fxePXf,
  53. .jYEggK {
  54. font-size: fontsize !important;
  55. }
  56. .vWGl {
  57. font-size: calc(var(--fontsize) - .2rem)!important;
  58. }
  59. span > .vWGl {
  60. font-size: inherit !important;
  61. }
  62. .gxOVkK {
  63. font-size: calc(var(--fontsize) - .4rem)!important;
  64. }
  65. if nocomments {
  66. [data-tag="content-card-comment-thread-container"],
  67. .bmnjsr {
  68. display: none !important;
  69. }
  70. }
  71. if nojump {
  72. .sc-jrQzAO.bAzCwM,
  73. .sc-o4u8m1-2 > div > div:nth-child(2),
  74. [data-tag="upgrade-incentive-description"],
  75. [data-tag="upgrade-free-membership-button"],
  76. [data-tag="free-membership-upgrade-cta"] {
  77. display: none !important;
  78. height: 0 !important;
  79. max-height: 0 !important;
  80. }
  81. }
  82. }
  83.  
  84. @-moz-document url("https://www.patreon.com/home") {
  85. if bigimages {
  86. * {
  87. aspect-ratio: auto !important;
  88. }
  89. .dofSdt img {
  90. min-width: 100% !important;
  91. object-fit: cover !important;
  92. }
  93. [data-tag="launcher-post-card"] > div > div > 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,[data-tag="chip-container"],.jhLQmG,.jhLQmG div,.dgQBHC) {
  94. display: flex !important;
  95. flex-basis: 100% !important;
  96. flex-direction: column !important;
  97. max-width: 100% !important;
  98. }
  99. img,
  100. div[elevation="subtle"] > div,
  101. .djipQD > .image-grid {
  102. display: block !important;
  103. height: auto !important;
  104. max-height: 100% !important;
  105. min-width: 100% !important;
  106. object-fit: contain !important;
  107. }
  108. img[loading="eager"] {
  109. width: auto !important;
  110. }
  111. .image-grid + .image-grid {
  112. margin-top: 2px;
  113. }
  114. .image-carousel {
  115. height: 112px;
  116. object-fit: contain;
  117. width: auto !important;
  118. }
  119. /* Little unblur */
  120. .dgyaSI {
  121. background: transparent !important;
  122. opacity: 0 !important;
  123. }
  124. .image-grid > img {
  125. background: transparent !important;
  126. object-fit: contain !important;
  127. min-width: 100% !important;
  128. }
  129. [data-tag="locked-badge-button"] p {
  130. padding-right: 3em;
  131. }
  132. [width="fluid"] a {
  133. max-width: 96% !important;
  134. overflow: hidden !important;
  135. }
  136. header {
  137. height: 0 !important;
  138. }
  139. a,
  140. img,
  141. .jQZWvF {
  142. overflow: hidden !important;
  143. }
  144. }
  145. if widemode {
  146. main > div > section > div {
  147. max-width: 100% !important;
  148. }
  149. }
  150. }
  151.  
  152. @-moz-document regexp("https://www\\.patreon\\.com/[^/]+/posts") {
  153. if bigimages {
  154. * {
  155. aspect-ratio: auto !important;
  156. }
  157. .dofSdt img {
  158. min-width: 100% !important;
  159. object-fit: cover !important;
  160. }
  161. [data-tag="post-card"] > div > 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,[data-tag="chip-container"],.jhLQmG,.jhLQmG div,.dgQBHC) {
  162. display: flex !important;
  163. flex-basis: 100% !important;
  164. flex-direction: column !important;
  165. max-width: 100% !important;
  166. }
  167. img,
  168. div[elevation="subtle"] > div,
  169. .djipQD > .image-grid {
  170. display: block !important;
  171. height: auto !important;
  172. max-height: 100% !important;
  173. max-width: 100% !important;
  174. min-width: 100% !important;
  175. object-fit: contain !important;
  176. }
  177. img[loading="eager"] {
  178. aspect-ratio: 1 / 1 !important;
  179. height: 100% !important;
  180. object-fit: cover !important;
  181. }
  182. .image-grid + .image-grid {
  183. margin-top: 2px;
  184. }
  185. .image-carousel {
  186. height: 112px;
  187. object-fit: contain;
  188. width: auto !important;
  189. }
  190. /* Little unblur */
  191. .dgyaSI {
  192. background: transparent !important;
  193. opacity: 0 !important;
  194. }
  195. .image-grid > img {
  196. background: transparent !important;
  197. object-fit: contain !important;
  198. min-width: 100% !important;
  199. }
  200. [data-tag="locked-badge-button"] p {
  201. padding-right: 3em;
  202. }
  203. [width="fluid"] a {
  204. max-width: 96% !important;
  205. overflow: hidden !important;
  206. }
  207. header {
  208. height: 417px !important;
  209. }
  210. a,
  211. img,
  212. .jQZWvF {
  213. overflow: hidden !important;
  214. }
  215. }
  216. if widemode {
  217. main > div > div > div > div > div:nth-of-type(4) > div:nth-of-type(2) {
  218. max-width: 100% !important;
  219. }
  220. main > div > div > div > div > div > div:nth-of-type(2) > div > div {
  221. grid-template-columns: 1fr auto auto !important;
  222. }
  223. }
  224. }
  225.  
  226. @-moz-document regexp("https://www\\.patreon\\.com/[^/]+/collections") {
  227. if widemode {
  228. main > div > div > div > div > div:nth-of-type(4) > div {
  229. max-width: 100% !important;
  230. }
  231. }
  232. }
  233.  
  234. @-moz-document regexp("https://www\\.patreon\\.com/[^/]+/membership") {
  235. if widemode {
  236. main > div > div > div > div > div:nth-of-type(4) > div {
  237. max-width: 100% !important;
  238. }
  239. }
  240. }
  241.  
  242. @-moz-document regexp("https://www\\.patreon\\.com/[^/]+/about") {
  243. div.sc-xac35p-1.jhLQmG {
  244. display: flex !important;
  245. flex-direction: row !important;
  246. justify-content: space-between !important;
  247. width: 100% !important;
  248. }
  249. header {
  250. height: 417px !important;
  251. }
  252. .sc-gIBqdA.hVkHgO > div > div.sc-jrQzAO.bmnjsr {
  253. padding-right: 2em;
  254. }
  255. if widemode {
  256. main > div > div > div > div > div:nth-of-type(4) > div {
  257. max-width: 100% !important;
  258. }
  259. }
  260. }
  261.  
  262. @-moz-document regexp("https://www\\.patreon\\.com/messages/[^?]+\\?mode=user&tab=direct-messages") {
  263. if widemode {
  264. [data-tag="chat-message"] > div {
  265. max-width: 100% !important;
  266. }
  267. [data-tag="chat-message"] > div > div {
  268. max-width: 100% !important;
  269. }
  270. }
  271. }
  272.  
  273. @-moz-document url-prefix("https://www.patreon.com/notifications") {
  274. if widemode {
  275. #__next > div:nth-child(5) > div {
  276. max-width: 100% !important;
  277. }
  278. }
  279. }
  280.  
  281. @-moz-document url-prefix("https://www.patreon.com/settings") {
  282. if widemode {
  283. #__next > div:nth-child(5) > div,
  284. main > div > div > div {
  285. max-width: 100% !important;
  286. }
  287. }
  288. }
  289.  
  290. @-moz-document url-prefix("https://www.patreon.com/posts") {
  291. if bigimages {
  292. * {
  293. aspect-ratio: auto !important;
  294. }
  295. .dofSdt img {
  296. min-width: 100% !important;
  297. object-fit: cover !important;
  298. }
  299. [data-tag="post-card"] > div > 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,[data-tag="chip-container"],.jhLQmG,.jhLQmG div,.dgQBHC) {
  300. display: flex !important;
  301. flex-basis: 100% !important;
  302. flex-direction: column !important;
  303. max-width: 100% !important;
  304. }
  305. img,
  306. div[elevation="subtle"] > div,
  307. .djipQD > .image-grid {
  308. height: auto !important;
  309. max-height: 100% !important;
  310. max-width: 100% !important;
  311. min-width: 100% !important;
  312. object-fit: contain !important;
  313. }
  314. img[loading="eager"] {
  315. aspect-ratio: 1 / 1 !important;
  316. height: 100% !important;
  317. object-fit: cover !important;
  318. }
  319. .image-grid + .image-grid {
  320. margin-top: 2px;
  321. }
  322. .image-carousel {
  323. height: 112px;
  324. object-fit: contain;
  325. width: auto !important;
  326. }
  327. /* Little unblur */
  328. .dgyaSI {
  329. background: transparent !important;
  330. opacity: 0 !important;
  331. }
  332. .image-grid > img {
  333. background: transparent !important;
  334. object-fit: contain !important;
  335. min-width: 100% !important;
  336. }
  337. [data-tag="locked-badge-button"] p {
  338. padding-right: 3em;
  339. }
  340. [width="fluid"] a {
  341. max-width: 96% !important;
  342. overflow: hidden !important;
  343. }
  344. header {
  345. height: 0 !important;
  346. }
  347. a,
  348. img,
  349. .jQZWvF {
  350. overflow: hidden !important;
  351. }
  352. if widemode {
  353. main > div > div > div > div > div {
  354. max-width: 100% !important;
  355. }
  356. main > div > div > div > div > div > div:nth-of-type(2) > div:nth-of-type(3) {
  357. grid-template-columns: 1fr auto auto !important;
  358. }
  359. [data-tag="post-card"] p {
  360. padding-right: 20px !important;
  361. white-space: break-spaces !important;
  362. }
  363. [data-tag="content-card-comment-thread-container"] {
  364. padding-right: 50px !important;
  365. }
  366. }
  367. }
  368. if nojump {
  369. main > div > div > div > div > div > div:nth-of-type(2) > div:nth-of-type(3) > div:nth-of-type(2) > div > div:first-child {
  370. display: none;
  371. height: 0;
  372. margin-top: 0;
  373. z-index: -9999;
  374. }
  375. }
  376. }