GreasyFork | Modernized ( Optional Dark Theme )

A much cleaner and more modern version of GreasyFork!

安装为用户样式
作者推荐脚本

您可能也喜欢Greasy Fork tweaks

安装此脚本
  1. /* ==UserStyle==
  2. -- THEME STUFF --
  3. @name GreasyFork | Modernized ( Optional Dark Theme )
  4. @version 1.3.17
  5. @description A much cleaner and more modern version of GreasyFork!
  6.  
  7. -- AUTHOR STUFF --
  8. @namespace Freeplay
  9. @author Freeplay (https://freeplay.codeberg.org/)
  10. @homepageURL https://codeberg.org/Freeplay/UserStyles
  11. @supportURL https://codeberg.org/Freeplay/UserStyles/issues
  12. @preprocessor stylus
  13.  
  14.  
  15. --- SETTINGS ---
  16. @var select theme "Theme" ["auto", "light", "dark"]
  17.  
  18. ==/UserStyle== */
  19.  
  20.  
  21. @-moz-document domain("greasyfork.org") {
  22. dark() {
  23. --color-primary: #272b36bd;
  24. --color-secondary: #072b3a ;
  25. --color-tertiary: #2c3242;
  26. --color-bg: #1c1f28;
  27. --color-text: #d1d1d1;
  28. --color-link: #00b3ff;
  29. --color-link-visited: cyan;
  30. --color-highlighted #287721;
  31. --shadow-normal: 0 0px 3px rgba(0,0,0,0.5);
  32. --shadow-button: none;
  33. --border-button: 1px solid rgba(150,150,150,.1);
  34. }
  35. light() {
  36. --color-primary: #980000bd;
  37. --color-secondary: white;
  38. --color-tertiary: white;
  39. --color-bg: #F6F6F6;
  40. --color-text: black;
  41. --color-link: #0265be;
  42. --color-link-visited: #cf2525;
  43. --color-highlighted: #9fefa3;
  44. --shadow-normal: 0 0 10px rgba(0, 0, 0, .01);
  45. --shadow-button: 0px 0px 0px 20px var(--color-bg) inset;
  46. --border-button: 1px #dcdcdc solid;
  47. }
  48. :root {
  49. if theme == auto {
  50. light();
  51. @media (prefers-color-scheme: dark) {
  52. dark();
  53. }
  54. } else if theme == light {
  55. light();
  56. } else {
  57. dark();
  58. }
  59. }
  60. * {
  61. transition: background .2s;
  62. }
  63. /* TEXT */
  64. h3, h2 {
  65. color: var(--color-text);
  66. }
  67. h3 {
  68. margin-bottom: 1em !important;
  69. }
  70. p {
  71. color: var(--color-text);
  72. }
  73. .post-discussion > p:first-child,
  74. .sidebarred-main-content > p,
  75. {
  76. font-size: 0;
  77. }
  78. .sidebarred-main-content > h2 + p {
  79. font-size: inherit !important;
  80. margin-top: 0 !important;
  81. }
  82. /* BUTTONS/LINKS */
  83. select, option, input, button:not(.lum-gallery-button), code, #user-control-panel > li, .sign-in-link a,
  84. .pagination > *, .script-list + .pagination > *, .user-list + .pagination > *,
  85. a.list-option-button, #script-links > li > *, #script-feedback-suggestion a, .discussion-actions a, .report-link, .edit-comment, .post-discussion > p:first-of-type a, .discussion-up-level a, .post-discussion > div > .inline-list > li a,
  86. #script-content > ul li a,
  87. #about-user > p:last-child > *, #about-user > a:first-child,
  88. #install-area a, .expander, #contribution > a, #support-url > a, .script-in-sets > a,
  89. .sidebarred-main-content > p:last-child a, .sidebarred-main-content > p:first-of-type a,
  90. #home-top-sites a,
  91. #by-site-list > li > a {
  92. border: var(--border-button) !important;
  93. text-decoration: none !important;
  94. border-radius: .3rem !important;
  95. padding: 5px 14px;
  96. font-size: 14px;
  97. font-family: Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji !important;
  98. transition: all .2s;
  99. background-color: var(--color-secondary) !important;
  100. color: var(--color-text) !important;
  101. list-style: none;
  102. outline: none !important;
  103. }
  104. code {
  105. padding: 2px 4px !important;
  106. }
  107. select:hover, input:hover, input:focus, button:not(.lum-gallery-button):hover, #user-control-panel > li:hover, .sign-in-link a:hover,
  108. a.list-option-button:hover, #script-links > li > *:hover, #script-feedback-suggestion a:hover, #script-links .current span, .discussion-actions a:hover, .report-link:hover, .edit-comment:hover, .post-discussion > p:first-of-type a:hover, .discussion-up-level a:hover, .post-discussion > div > .inline-list > li a:hover,
  109. #script-content > ul li a:hover,
  110. #about-user > p:last-child > *:hover, #about-user > a:first-child:hover,
  111. .pagination > *:hover, .script-list + .pagination > *:hover, .user-list + .pagination > *:hover, .pagination > *:focus, .script-list + .pagination > *:focus, .user-list + .pagination > *:focus,
  112. #install-area a:hover, .expander:hover, #contribution > a:hover, #support-url > a:hover, .script-in-sets > a:hover,
  113. .sidebarred-main-content > p:last-child a:hover, .sidebarred-main-content > p:first-of-type a:hover,
  114. #home-top-sites a:hover,
  115. #by-site-list > li > a:hover {
  116. box-shadow: var(--shadow-button) !important;
  117. background-color: var(--color-tertiary) !important;
  118. text-decoration: none !important;
  119. }
  120. select:not(#remove-scripts-included) { /* Contributed by https://codeberg.org/Riedler */
  121. appearance:none;
  122. background-image:url("https://riedler.wien/sfto/darklearning/double_triangles_top_bottom_AAA.svg");
  123. background-repeat:no-repeat;
  124. background-position:center right 7px !important;
  125. background-size:auto 50%;
  126. }
  127. nav > li > a, .pagination > a, #user-control-panel > li > a, #script-links > li > a, div[class="list-option-group"] > ul > li > a, h2 > a ,
  128. .comment-meta-item-main a {
  129. text-decoration: none;
  130. color: var(--color-text);
  131. }
  132. .pagination {
  133. margin-bottom: 20px;
  134. }
  135. a {
  136. display: inline-block;
  137. }
  138. a, a.discussion-title, a.discussion-title:hover {
  139. text-underline-offset: .25em;
  140. color: var(--color-link);
  141. }
  142. a:hover, a.discussion-title:hover {
  143. text-decoration: underline;
  144. }
  145. a:visited {
  146. color: var(--color-link-visited);
  147. }
  148. body, html {
  149. background-color: var(--color-bg);
  150. font-family: Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji !important;
  151. }
  152. body > .width-constraint {
  153. max-width: 100% !important;
  154. margin: 0;
  155. padding: 10px;
  156. display: flex;
  157. flex-direction column
  158. // flex-wrap: wrap;
  159. }
  160. body > .width-constraint > * {
  161. width: 100%;
  162. }
  163. body > .width-constraint > section, .notice, .alert, .announcement {
  164. max-width: 80rem;
  165. margin: auto !important;
  166. }
  167. body > .width-constraint > section:first-child, .notice, .alert {
  168. margin-top: 20px !important;
  169. }
  170. body > .width-constraint > section:last-of-type {
  171. margin-bottom: 40px !important;
  172. }
  173. .alert, .announcement {
  174. background-color: var(--color-secondary);
  175. margin-bottom: 20px !important;
  176. }
  177. .alert *, .announcement {
  178. color: var(--color-text) !important;
  179. padding: 10px;
  180. }
  181. .announcement {
  182. margin-top: 10px !important;
  183. border-radius: .3rem;
  184. }
  185. section {
  186. border: none !important;
  187. }
  188. .notice {
  189. background-color: var(--color-secondary);
  190. }
  191. .text-content, .discussion-list, #browse-user-list, .inline-form, #new_user,
  192. #script-meta, #additional-info, #script-show-info-ad, #script-content .script-discussion-list, canvas,
  193. /*.multiform-page*/, #script-content form:not(.script-in-sets), table, .comment,
  194. #script-content > ul {
  195. padding: 1rem !important;
  196. margin: 0 auto !important;
  197. margin-bottom: 20px !important;
  198. border: var(--border-button) !important;
  199. box-shadow: var(--shadow-normal) !important;
  200. background-color: var(--color-tertiary) !important;
  201. color: var(--color-text);
  202. border-radius: .5rem;
  203. }
  204. .text-content > *:first-child {
  205. margin-top: 0 !important;
  206. }
  207. .text-content > *:last-child, #script-meta > *:last-child {
  208. margin-bottom: 0 !important;
  209. }
  210. @media only screen and (min-width: 940px) {
  211. body {
  212. margin-top: 44px;
  213. }
  214.  
  215. /* HEADER */
  216. #main-header {
  217. position: fixed;
  218. top: 0;
  219. width: 100%;
  220. height: 44px;
  221. padding: 0;
  222. z-index: 5;
  223. background-image: none;
  224. background-color: var(--color-primary);
  225. backdrop-filter: blur(10px);
  226. }
  227. #main-header > .width-constraint {
  228. max-width: 100%;
  229. padding-left: 10px;
  230. padding-right: 10px;
  231. display: flex !important;
  232. align-items: center;
  233. margin: auto !important;
  234. }
  235. #site-name {
  236. position: absolute;
  237. width: 200px;
  238. min-width: 200px;
  239. height: 30px;
  240. margin-top: auto;
  241. margin-bottom: auto;
  242. display: flex;
  243. white-sapce: nowrap;
  244. align-items: center;
  245. gap: 4px;
  246. z-index: 10;
  247. }
  248. #site-name img {
  249. height: 30px;
  250. width: 30px;
  251. }
  252. #site-name-text {
  253. margin-top: 0 !important;
  254. }
  255. #site-name-text > h1 {
  256. font-size: 24px;
  257. font-weight: 600;
  258. white-space: nowrap;
  259. }
  260.  
  261. #site-nav {
  262. display: flex !important;
  263. height: 40px;
  264. padding-top: 1px;
  265. width: auto;
  266. align-items: center;
  267. margin-top: 0 !important;
  268. width: 100%;
  269. justify-content: flex-end;
  270. }
  271. #site-nav > * {
  272. position: relative !important;
  273. }
  274. #site-nav > nav {
  275. width: 100% !important;
  276. height: 20px;
  277. display: flex;
  278. align-items: center;
  279. justify-content: flex-end;
  280. }
  281. #nav-user-info {
  282. width: auto;
  283. order: 2;
  284. height: 20px;
  285. display: flex;
  286. align-items: center;
  287. }
  288. #nav-user-info .sign-out-link, #nav-user-info .sign-in-link {
  289. width: max-content !important;
  290. }
  291. #nav-user-info > form > select {
  292. margin: 0 0 0 26px;
  293. height: 32px;
  294. }
  295. #site-nav > nav > li + li {
  296. margin-left: 1em;
  297. }
  298. #nav-user-info .user-profile-link a, #nav-user-info .sign-out-link a {
  299. text-decoration: none;
  300. font-size: 16px;
  301. }
  302. #nav-user-info .sign-out-link {
  303. font-size: 0;
  304. margin-left: 16px;
  305. }
  306. #nav-user-info .with-submenu {
  307. padding-right: 16px;
  308. }
  309. #nav-user-info a:hover {
  310. text-decoration: underline;
  311. }
  312. .with-submenu > nav {
  313. background-color: var(--color-primary);
  314. backdrop-filter: blur(10px);
  315. }
  316. /* SIDEBAR */
  317. .sidebar ~ div {
  318. max-width: 50rem;
  319. }
  320. .sidebar {
  321. position: sticky;
  322. top: 44px;
  323. order: -1;
  324. margin: -10px 15px -10px -10px;
  325. padding: 20px 0 20px 10px;
  326. height: calc(100vh - 84px);
  327. max-height: calc(100vh - 84px);
  328. overflow-y: auto;
  329. overflow-x: hidden;
  330. z-index: 6;
  331. text-decoration: none !important;
  332. scrollbar-color: var(--color-primary) transparent;
  333. scrollbar-width: thin;
  334. }
  335. .sidebar-search {
  336. position: fixed;
  337. top: 5px;
  338. left: 180px;
  339. }
  340. .sidebar-search input[type="search"] {
  341. height: 32px;
  342. border: none !important;
  343. border-radius: .3rem !important;
  344. width: 170px;
  345. text-align: center;
  346. color: var(--color-text) !important;
  347. padding-inline-end: 30px;
  348. box-shadow: 0px 0px 2px rgba(0,0,0,0.1) !important;
  349. background-color: var(--color-primary) !important;
  350. color: white !important;
  351. font-weight: 700;
  352. filter: opacity(.5);
  353. transition: width .2s, background-color .5s, color .5s, filter .2s;
  354. }
  355. .sidebar-search input[type="search"]:focus, .sidebar-search input[type="search"]:hover {
  356. width: calc(100vw - 450px);
  357. transition: width .5s, background-color .2s, color .2s, filter .2s;
  358. filter: opacity(1);
  359. background-color: var(--color-secondary) !important;
  360. color: var(--color-text) !important;
  361. }
  362. .sidebar-search input[type="submit"] {
  363. display: none;
  364. }
  365. #script-list-option-groups > div, .list-option-group {
  366. padding: 10px;
  367. color: var(--color-text);
  368. background-color: var(--color-secondary);
  369. border-radius: .3rem;
  370. box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
  371. }
  372. #script-list-option-groups > div > ul, .list-option-group > ul {
  373. background-color: transparent;
  374. box-shadow: none;
  375. border: none;
  376. margin: -10px;
  377. }
  378. .list-current {
  379. border-left-color: var(--color-primary) !important;
  380. border-left-width: 4px !important;
  381. }
  382. /* LISTS */
  383. .sidebarred-main-content {
  384. margin-top: 10px !important;
  385. }
  386. .sidebarred-main-content > h2 {
  387. margin-top: 0;
  388. }
  389. #browse-script-list {
  390. margin-top: 0;
  391. }
  392. #browse-script-list, #user-script-list, #user-deleted-script-list, .script-list {
  393. display: grid;
  394. grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  395. grid-gap: 10px;
  396. border: none !important;
  397. box-shadow: none !important;
  398. background-color: transparent;
  399. }
  400. }
  401. #browse-script-list > li, #user-script-list > li, #user-deleted-script-list > li, #user-unlisted-script-list > li,
  402. #user-library-script-list > li {
  403. border: var(--border-button) !important;
  404. border-radius: .5rem;
  405. background-color: var(--color-tertiary);
  406. transition: box-shadow .2s;
  407. color: var(--color-text);
  408. display: flex;
  409. &:hover {
  410. box-shadow: 0px 2px 20px rgba(0,0,0,0.1);
  411. }
  412. }
  413. #browse-script-list > li > article, #user-script-list > li > article, #user-deleted-script-list > li > article, #user-unlisted-script-list > li > article {
  414. height: 100%;
  415. display: flex;
  416. flex-wrap: wrap;
  417. width: auto !important;
  418. flex-grow: 1 !important;
  419. max-width: 100% !important;
  420. }
  421. #browse-script-list > li > article > h2 {
  422. overflow: hidden;
  423. max-height: 100px;
  424. }
  425. .inline-script-stats {
  426. margin-top: auto;
  427. width: 100%;
  428. }
  429. .inline-script-stats dd {
  430. max-width: 100%;
  431. }
  432. #browse-script-list > li > article > h2 > a {
  433. font-weight: 600;
  434. }
  435. #browse-script-list > li > article > h2::before {
  436. content: "";
  437. display: flex;
  438. position: relative;
  439. z-index: 2;
  440. width: 100%;
  441. height: 40px;
  442. color: var(--color-tertiary);
  443. background: linear-gradient(transparent, currentColor);
  444. box-shadow: 0 10px 0 var(--color-tertiary);
  445. margin-top: -40px;
  446. transform: translateY(100px);
  447. pointer-events: none;
  448. }
  449. /* Greasy Fork Tweaks Thumbnail Images */
  450. #browse-script-list > li > article ~ div,
  451. #user-script-list > li > article ~ div,
  452. #user-deleted-script-list > li > article ~ div {
  453. max-height: 185px !important;
  454. height: calc(100% + 2em) !important;
  455. width: auto !important;
  456. max-width: 40% !important;
  457. margin-right: -1em !important;
  458. margin-top: -1em !important;
  459. margin-bottom: -1em !important;
  460. margin-left: 1em !important;
  461. border-top-right-radius: .5rem !important;
  462. border-bottom-right-radius: .5rem !important;
  463. padding: 0 !important;
  464. transition: max-width .5s, width .5s;
  465. display: flex !important;
  466. transition: max-width .5s;
  467. justify-content: center;
  468. }
  469. #browse-script-list > li > article ~ div > img,
  470. #user-script-list > li > article ~ div > img,
  471. #user-deleted-script-list > li > article ~ div > img {
  472. max-width: 100% !important;
  473. width: 100% !important;
  474. align-self: center;
  475. }
  476. #browse-script-list #script-list-ea {
  477. width: 100%;
  478. }
  479. #browse-script-list #script-list-ea + div:last-of-type {
  480. display: none !important;
  481. width: 0 !important;
  482. }
  483. .script-list li:not(.ad-entry) {
  484. border-right: 1px solid #DDDDDD;
  485. }
  486. .ad-entry, #codefund {
  487. grid-column: 1/-1;
  488. }
  489. .ad-entry > div {
  490. height: auto !important;
  491. padding: 0 !important;
  492. }
  493. [data-ea-publisher].loaded .ea-content a:link, [data-ea-type].loaded .ea-content a:link {
  494. color: var(--color-link) !important;
  495. }
  496. .sidebarred-main-content {
  497. display: flex;
  498. flex-wrap: wrap;
  499. height: min-content;
  500. }
  501. .sidebarred-main-content > * {
  502. width: 100%;
  503. }
  504. .sidebarred-main-content > p {
  505. width: auto;
  506. margin: 1em 0 0;
  507. }
  508. .sidebarred-main-content > p:last-child {
  509. order: -1;
  510. }
  511. /*** FILTER BY SITES PAGE ***/
  512. #by-site-list > li > a {
  513. font-size: inherit !important;
  514. }
  515.  
  516. /*** SCRIPT DETAILS PAGE ***/
  517. #script-info {
  518. display: flex;
  519. flex-wrap: wrap;
  520. background: none !important;
  521. }
  522. #script-info > * {
  523. width: 100%;
  524. }
  525. #script-info, #additional-info, #user-profile {
  526. background: none;
  527. background-color: var(--color-tertiary);
  528. box-shadow: none;
  529. color: var(--color-text);
  530. }
  531. #script-info > header {
  532. order: -1;
  533. width: 100%;
  534. }
  535. #script-info header h2 {
  536. font-weight: 600;
  537. }
  538. #script-links {
  539. margin: 12px 0;
  540. padding-top: 12px !important;
  541. padding: 0;
  542. display: flex;
  543. flex-wrap: wrap;
  544. position: sticky;
  545. top: 45px;
  546. display: inline;
  547. width: 150px;
  548. height: min-content;
  549. max-height: calc(100vh - 58px);
  550. overflow-y: auto;
  551. }
  552. #script-links .current {
  553. border: none !important;
  554. box-shadow: none;
  555. }
  556. #script-links li {
  557. margin: 8px 0px;
  558. }
  559. .script-show-applies-to .inline-list {
  560. display: flex;
  561. flex-wrap: wrap;
  562. }
  563. #script-content {
  564. margin: 20px;
  565. width: calc(100% - 200px);
  566. display: flex;
  567. flex-wrap: wrap;
  568. height: min-content;
  569. }
  570. #script-content > * {
  571. width: 100%;
  572. }
  573. #script-show-info-ad {
  574. min-height: 0;
  575. overflow-y: auto;
  576. .ad-content {
  577. height: 0;
  578. }
  579. }
  580. #script-feedback-ad:has(#script-feedback-ea:empty) { // if ublock
  581. display: none;
  582. }
  583. .install-link {
  584. background-color: var(--color-highlighted) !important;
  585. }
  586. #script-feedback-suggestion, .script-in-sets, #install-area {
  587. margin: 0;
  588. width: auto !important;
  589. display: flex;
  590. flex-wrap: wrap;
  591. font-size: 0;
  592. }
  593. #script-feedback-suggestion a, .script-in-sets *, #install-area a,
  594. .post-discussion > p:first-child a,
  595. .sidebarred-main-content > p a {
  596. font-size: 14px;
  597. margin: 0;
  598. margin-right: 8px;
  599. margin-bottom: 1em;
  600. }
  601. .discussion-snippet {
  602. white-space: normal !important;
  603. }
  604. .script-in-sets {
  605. order: 1;
  606. width: 100% !important;
  607. }
  608. #script-meta {
  609. order: 2;
  610. max-width: none;
  611. flex: 1 1 600px;
  612. }
  613. #script-meta dt {
  614. max-width: none !important;
  615. }
  616. #script-show-info-ad {
  617. order: 3;
  618. margin-left: 1em !important;
  619. flex: 1 1 200px;
  620. }
  621. #additional-info {
  622. order: 3;
  623. display: flex;
  624. flex-wrap: wrap;
  625. }
  626. #additional-info > * {
  627. width: 100%;
  628. }
  629. .user-screenshots {
  630. order: -1;
  631. margin-top: 0 !important;
  632. margin-bottom: 1em;
  633. width: 100%;
  634. }
  635. .post-discussion {
  636. width: 100%;
  637. }
  638. section > *:first-child, #script-content > *:first-child, #script-content p, #script-content h3, form > p:first-of-type,
  639. .discussion-header {
  640. margin-top: 0 !important;
  641. }
  642. .multiform-page {
  643. padding: 0 !important;
  644. }
  645. canvas {
  646. background-color: white !important;
  647. }
  648. /*** FORUMS ***/
  649. .discussion-read {
  650. background-color: var(--color-secondary) !important;
  651. }
  652. .discussion-list-item {
  653. border-top: var(--border-button) !important;
  654. border-bottom: var(--border-button) !important;
  655. }
  656. .user-content {
  657. background: none;
  658. }
  659. .comment-meta-item a {
  660. margin-bottom: -100px;
  661. }
  662. .discussion-header h2 {
  663. margin-top: .5rem;
  664. }
  665. /* FAVORITES LIST */
  666. .post-discussion > div:last-of-type {
  667. order: 5;
  668. }
  669. /*** USER PAGE ***/
  670. /* About User */
  671. a.report-link.report-link-abs {
  672. margin-top: 1em !important;
  673. }
  674. /* Control Panel */
  675. #user-control-panel, #script-content > ul {
  676. display: flex;
  677. flex-wrap: wrap;
  678. grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  679. grid-gap: 10px;
  680. padding: 10px;
  681. list-style: none;
  682. }
  683. #user-control-panel > li {
  684. text-decoration: none;
  685. list-style: none;
  686. text-align: center;
  687. background-color: var(--color-secondary);
  688. padding: 5px 16px;
  689. border-radius: .3rem;
  690. }
  691. .post-discussion > div > .inline-list {
  692. display: grid;
  693. grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  694. grid-gap: 4px 6px;
  695. }
  696. .post-discussion > div > .inline-list > li a {
  697. display: block;
  698. white-space: nowrap;
  699. overflow: hidden;
  700. text-overflow: ellipsis;
  701. }
  702.  
  703.  
  704. /*** HOMEPAGE ***/
  705. body .width-constraint > .text-content > h2 {
  706. z-index: 2;
  707. position: relative;
  708. margin-bottom: 1rem;
  709. margin-top: 2rem !important;
  710. }
  711. #home-script-nav {
  712. margin-bottom: 60px;
  713. z-index: 1;
  714. width: max-content;
  715. max-width: none;
  716. border: none !important;
  717. }
  718. #home-top-sites {
  719. margin-top: 1rem;
  720. z-index: 2;
  721. position: relative;
  722. font-size: 0;
  723. }
  724.  
  725. /*** POPUPS ***/
  726. .lum-lightbox {
  727. z-index: 100;
  728. }
  729.  
  730.  
  731. }