GreasyFork | Modernized ( Optional Dark Theme )

A much cleaner and more modern version of GreasyFork!

当前为 2020-10-19 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

/* ==UserStyle==
 -- THEME STUFF --
@name           GreasyFork | Modernized ( Optional Dark Theme )
@version        1.3.5
@description    A much cleaner and more modern version of GreasyFork!

 -- AUTHOR STUFF --
@namespace      Freeplay
@author         Freeplay (https://pages.codeberg.org/freeplay/)
@homepageURL    https://codeberg.org/Freeplay/UserStyles
@supportURL     https://codeberg.org/Freeplay/UserStyles/issues
@preprocessor   stylus


--- SETTINGS ---
@var checkbox darkmode "Dark Mode" 0 

==/UserStyle== */
/* Oct, 19 / 20
- Nicer font
- Fixed spacing in some areas
- Fixed alerts box on Dark Mode
- Better sortof seperators
- Transparent blurred header, can be removed by making color-primary var opaque.
- More Tweaks
- Now works with 'Greasy Fork Tweaks'! https://greasyfork.org/en/scripts/368183
/* Oct, 15 / 20
- Added max-width to alerts
- Added boxes around forms and comments
- Added scrollbar-color to firefox
- Added max-heights to script lists
- More stylized buttons
- More fixes
- Made stat charts on Dark Mode light
/* Aug, 31 / 20
- Fixed ad placement in Script Details page
- Less saturated topbar on light theme, You can always change the colors inside of :root{}
- Moved some buttons on scripts list page
/* Aug, 23 / 20
- Properly modernised the Script Details page! :D
/* Aug, 20 / 20
- Softened Shadows
- Changed script details page a bit
- Fixed header on homepage
- Fixed forums on Dark Mode
- Moved search bar to header
- Fixed some textboxes
- More fixes
/* Aug, 16 / 20
- Better positioning & look
- Better sidebar
- Forums support
- Added max-width to some pages
- Better Metadata
*/
/* Jul, 6 / 20
- Dark Mode!
*/
/* Jun, 7 / 20 
- Changed links back to underlines, Didn't work too well in some areas
*/
/* Jun, 5 / 20 
- Minor changes - AKA other things I forgot to log.
- Modern TextBox
- Sortof Modern Dropdown
- Links are now shown by the blue color instead of the underline, hovering displays underline
- Tweaked Header
*/
@-moz-document domain("greasyfork.org") {
	:root {
		if darkmode {
			/* DARK MODE COLORS */
			--color-primary: #272b36bd;
			--color-secondary: #072b3a ;
			--color-tertiary: #2c3242;
			--color-bg: #1c1f28;
			--color-text: #d1d1d1;
			--color-link: #00b3ff;
			--color-link-visited: cyan;
			--color-highlighted #287721;
			--shadow-normal: 0 0 5px rgba(0,0,0,0.1);
			--shadow-button: 0px 0px 2px rgba(150,150,150,0);
			--border-button:  1px solid rgba(150,150,150,0.1);
		} else {
			/* LIGHT MODE COLORS */
			--color-primary: #980000bd;
			--color-secondary: white;
			--color-tertiary: white;
			--color-bg: #F6F6F6;
			--color-text: black;
			--color-link: #0265be;
			--color-link-visited: #cf2525;
			--color-highlighted: #9fefa3;
			--shadow-normal: 0 0 20px rgba(221, 221, 221, 1);
			--shadow-button: 0px 0px 2px rgba(0,0,0,0.3);
			--border-button:  1px solid rgba(0,0,0,0.2);
		}
	}
	* {
		transition: background .2s;
	}
		
		/* TEXT */
		h3, h2 {
			color: var(--color-text);
		}
		p {
			color: var(--color-text);
		}
		pre.prettyprint {
			background-color: white;
			max-height: none;
		}
		
		/* BUTTONS/LINKS */
		select, option, input, button, code, #user-control-panel > li, 
		.pagination > *, .script-list + .pagination > *, .user-list + .pagination > *, 
		a.list-option-button, #script-links > li > *, #script-feedback-suggestion a, .discussion-actions a, .report-link, .edit-comment,
		#about-user > p:last-child > *, #about-user > a:first-child,
 		#install-area a, .expander, #contribution > a,  #support-url > a, .script-in-sets > a,
 		.sidebarred-main-content > p:last-child a, .sidebarred-main-content > p:first-of-type a {
			border: none;
			
			border: var(--border-button);
			text-decoration: none;
			border-radius: .3rem;
			padding: 5px 14px;
			font-size: 14px;
			/*font-family: Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji !important;*/
			transition: all .2s;
			background-color: var(--color-secondary);
			color: var(--color-text) !important;
		}
		select:hover, input:hover, input:focus, button:hover, #user-control-panel > li:hover, 
		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,
		#about-user > p:last-child > *:hover, #about-user > a:first-child:hover,
		.pagination > *:hover, .script-list + .pagination > *:hover, .user-list + .pagination > *:hover, .pagination > *:focus, .script-list + .pagination > *:focus, .user-list + .pagination > *:focus, 
 		#install-area a:hover, .expander:hover, #contribution > a:hover, #support-url > a:hover, .script-in-sets > a:hover,
 		.sidebarred-main-content > p:last-child a:hover, .sidebarred-main-content > p:first-of-type a:hover {
			box-shadow: 0px 0px 8px rgba(0,0,0,0.1) !important;
			background: var(--color-tertiary) !important;
			text-decoration: none !important;
		}
		
		nav > li > a, .pagination > a, #user-control-panel > li > a, #script-links > li > a, div[class="list-option-group"] > ul > li > a, h2 > a ,
		.comment-meta-item-main a {
			text-decoration: none;
			color: var(--color-text);
		}
		a {
			display: inline-block;
		}
		a, a.discussion-title, a.discussion-title:hover {
			text-underline-offset: .25em;
			color: var(--color-link);
		}
		a:hover, a.discussion-title:hover {
			text-decoration: underline;
		}
		a:visited {
			color: var(--color-link-visited);
		}
		body {
			background-color: var(--color-bg);
			font-family: Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji !important;
		}
		body > .width-constraint {
			max-width: 100% !important;
			margin: 0;
			padding: 10px;
			display: flex;
			flex-wrap: wrap;
		}
		body > .width-constraint > * {
			width: 100%;
		}
		body > .width-constraint > section, .notice, .alert {
			max-width: 80rem;
			margin: auto !important;
		}
		body > .width-constraint > section:first-child, .notice, .alert {
			margin-top: 20px !important;
		}
		body > .width-constraint > section:last-of-type {
			margin-bottom: 40px !important;
		}
		.alert {
			background-color: var(--color-secondary);
			margin-bottom: 20px !important;
		}
		.alert * {
			color: var(--color-text) !important;
		}
		
		section {
			border: none !important;
		}
		
		.notice {
			background-color: var(--color-secondary);
		}
		
		
		.text-content, .discussion-list, #browse-user-list, 
		#script-meta, #additional-info, #script-show-info-ad, #script-content .script-discussion-list, canvas, 
		/*.multiform-page*/, #script-content form:not(.script-in-sets), table, .comment {
			padding: 1rem !important;
			margin: 0 !important;
			margin-bottom: 20px !important;
			border: none;
			box-shadow: var(--shadow-normal) !important;
			background-color: var(--color-tertiary);
			color: var(--color-text);
			border-radius: 5px;
		}
		.text-content > *:first-child {
			margin-top: 0 !important;
		}
		.text-content > *:last-child, #script-meta > *:last-child {
			margin-bottom: 0 !important;
		}
		
		
	@media only screen and (min-width: 940px) { 
		
		
		body {
			margin-top: 44px;
		}
		
		
		
		

		/* HEADER */
		#main-header {
			position: fixed;
			top: 0;
			width: 100%;
			height: 44px;
			padding: 0;
			z-index: 5;
			background-image: none;
			background-color: var(--color-primary);
			backdrop-filter: blur(10px);
		}
		#main-header > .width-constraint {
			max-width: 100%;
			padding-left: 10px;
			padding-right: 10px;
			display: flex !important;
			align-items: center;
			margin: auto !important;
		}
		#site-name {
			position: absolute;
			width: 200px;
			min-width: 200px;
			height: 30px;
			margin-top: auto;
			margin-bottom: auto;
		}
		#site-name img {
			height: 30px;
		}
		#site-name-text {
			margin-top: 0 !important;
		}
		#site-name-text > h1 {
			height: 30px;
			font-size: 25px;
			font-weight: 600;
		}

		#site-nav {
			display: flex !important;
			height: 40px;
			padding-top: 1px;
			width: auto;
			align-items: center;
			margin-left: auto;
			margin-top: 0 !important;
		}
		#site-nav > * {
			position: relative !important;
		}
		#site-nav > nav {
			width: 250px !important;
			min-width: 250px;
		}
		#nav-user-info {
			width: 100%;
			min-width: 300px;
		}
		#nav-user-info > form > select {
			margin: 0 10px;
		}
		
		.with-submenu > nav {
			background-color: var(--color-primary);
		}
		
		/* SIDEBAR */
		.sidebar ~ div {
			max-width: 50rem;
		}
		.sidebar {
			position: sticky;
			top: 44px;
			order: -1;
			margin: -10px 15px -10px -10px;
			padding: 20px 0 20px 10px;
			height: calc(100vh - 84px);
			max-height: calc(100vh - 84px);
			overflow-y: auto;
			overflow-x: hidden;
			z-index: 6;
			text-decoration: none !important;
			
			scrollbar-color: var(--color-primary) var(--color-bg);
		}
			.sidebar-search {
				position: fixed;
				top: 7px;
				left: 200px;
				height: 29px;
			}
				.sidebar-search input[type="search"] {
					height: 30px;
					border: none;
					border-radius: .3rem;
					width: 200px;
					max-width: calc(100vw - 300px);
					color: var(--color-text) !important;
					padding-inline-end: 30px;
					box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
					background-color: var(--color-tertiary);
					transition: width .2s; 
				}
				.sidebar-search input[type="search"]:focus, .sidebar-search input[type="search"]:hover {
					width: 500px;
					transition: width .5s; 
				}
				.sidebar-search input[type="submit"] {
					padding-inline-start: 6px !important;
				}
			#script-list-option-groups > div, .list-option-group {
				padding: 10px;
				color: var(--color-text);
				
				background-color: var(--color-secondary);
				border-radius: .3rem;
				box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
			}
				#script-list-option-groups > div > ul, .list-option-group > ul {
					background-color: transparent;
					box-shadow: none;
					border: none;
					margin: -10px;
				}
				.list-current {
					border-left-color: var(--color-primary) !important;
					border-left-width: 4px !important;
				}
				if darkmode {
					.list-current {
						background: none !important;
						background-color: var(--color-tertiary) !important;
						color: var(--color-text);
					}
					.list-option-group a:hover, .list-option-group a:focus {
						background: none !important;
						background-color: var(--color-tertiary) !important;
						box-shadow: none !important;
					}
				}
					
					
	
					
					
					
		/* LISTS */
		#browse-script-list, #user-script-list, #user-deleted-script-list {
			display: grid;
			grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
			grid-gap: 10px;
			border: none;
			box-shadow: none;
			background-color: transparent;
		}
		
		
	}
		
		
			#browse-script-list > li, #user-script-list > li, #user-deleted-script-list > li {
				border: none !important;
				border-radius: .3rem;
				background-color: var(--color-secondary);
				transition: box-shadow .2s;
				color: var(--color-text);
			}
			#browse-script-list > li:hover, #user-script-list > li:hover, #user-deleted-script-list > li:hover {
				box-shadow: 0px 2px 20px rgba(0,0,0,0.1);
			}
				#browse-script-list > li > article, #user-script-list > li > article, #user-deleted-script-list > li > article {
					height: 100%;
					display: flex;
					flex-wrap: wrap;
				}
					#browse-script-list > li > article > h2 {
						overflow: hidden;
						max-height: 100px;
					}
					.inline-script-stats {
						margin-top: auto;
						width: 100%;
					}
					#browse-script-list > li > article > h2 > a {
						font-weight: 600;
					}
					#browse-script-list > li > article > h2::before {
						content: "";
						display: flex;
						position: relative;
						z-index: 2;
						width: 100%;
						height: 40px;
						color: var(--color-secondary);
						background: linear-gradient(transparent, currentColor);
						box-shadow: 0 10px 0 var(--color-secondary);
						margin-top: -40px;
						transform: translateY(100px);
						pointer-events: none;
					}
					/* Greasy Fork Tweaks Thumbnail Images */
					#browse-script-list > li > article ~ div {
						height: auto !important;
					}
					#browse-script-list > li > article ~ div > img {
						max-width: 100% !important;
					}
				
			.script-list li:not(.ad-entry) {
				border-right: 1px solid #DDDDDD;
			}
			.ad-entry, #codefund {
				grid-column: 1/-1;
			}
			.ad-entry > div {
				height: auto !important;
				padding: 0 !important;
			}
			[data-ea-publisher].loaded .ea-content a:link, [data-ea-type].loaded .ea-content a:link {
				color: var(--color-link) !important;
			}
			
			
		.sidebarred-main-content {
			display: flex;
			flex-wrap: wrap;
			height: min-content;
		}
		.sidebarred-main-content > * {
			width: 100%;
			
		}
		.sidebarred-main-content > p {
			width: auto;
			margin: 1em 4px 0;
		}
		.sidebarred-main-content > p:last-child {
			order: -1;
		}
			
		/*** FILTER BY SITES PAGE ***/
		
		/*** SCRIPT DETAILS PAGE ***/
		
		#script-info {
			display: flex;
			flex-wrap: wrap;
			
			background: none !important;
		}
		#script-info > * {
			width: 100%;
		}
		#script-info, #additional-info, #user-profile {
			background: none;
			background-color: var(--color-tertiary);
			box-shadow: none;
			color: var(--color-text);
		}
		#script-info > header {
			order: -1;
			width: 100%;
		}
		#script-info header h2 {
			font-weight: 600;
		}
		#script-links {
			margin: 12px 0;
			margin-top: 12px !important;
			padding: 0;
			display: flex;
			flex-wrap: wrap;
			
			position: sticky;
			top: 58px;
			display: inline;
			width: 150px;
			height: min-content;
		}
		#script-links .current {
			border: none !important;
			box-shadow: none;
		}
		#script-links li {
			margin: 8px 0px;
		}
		.script-show-applies-to .inline-list {
			display: flex;
			flex-wrap: wrap;
		}
		#script-content {
			margin: 20px;
			width: calc(100% - 200px);
			display: flex;
			flex-wrap: wrap;
			height: min-content;
		}
		#script-content > * {
			width: 100%;
		}
		.install-link {
			background-color: var(--color-highlighted) !important;
		}
		#script-feedback-suggestion, .script-in-sets, #install-area {
			margin: 0;
			width: auto !important;
			display: flex;
			flex-wrap: wrap;
			margin-bottom: 1rem;
			font-size: 0;
		}
		#script-feedback-suggestion a, .script-in-sets *, #install-area a {
			font-size: 14px;
			margin: 0 4px;
		}
		.discussion-snippet {
			white-space: normal !important;
		}
		.script-in-sets {
			order: 1;
			width: 100% !important;
			margin-bottom: 1rem;
		}
		#script-meta {
			order: 2;
			max-width: none;
			flex: 1 1 400px;
		}
		#script-meta dt {
			max-width: 100px;
		}
		
		#script-show-info-ad {
			order: 3;
			margin-left: 1em !important;
			flex: 1 1 200px;
		}
		#additional-info {
			order: 3;
			display: flex;
			flex-wrap: wrap;
		}
		#additional-info > * {
			width: 100%;
		}
		.user-screenshots {
			order: -1;
			margin-top: 0 !important;
			margin-bottom: 1em;
			width: 100%;
		}
		.post-discussion {
			width: 100%;
		}
		
		section > *:first-child, #script-content > *:first-child, #script-content p, #script-content h3, form > p:first-of-type {
			margin-top: 0 !important;
		}
		.multiform-page {
			padding: 0 !important;
		}
		
		canvas {
			background-color: white !important;
		}
		/*** FORUMS ***/
		.discussion-read {
			background-color: var(--color-secondary) !important;
		}
		.discussion-list-item {
			border-top: var(--border-button) !important;
			border-bottom: var(--border-button) !important;
		}
		.user-content {
			background: none;
		}
			
		/*** USER PAGE ***/
		/* About User */
		
		.report-link-abs {
			position: relative;
		}
		/* Control Panel */
		#user-control-panel {
			display: flex;
			flex-wrap: wrap;
			grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
			grid-gap: 10px;
			padding: 10px;
		}
			#user-control-panel > li {
				text-decoration: none;
				list-style: none;
				text-align: center;
				background-color: var(--color-secondary);
				padding: 5px 16px;
				border-radius: .3rem;
			}
		
	}