smol tweaks for USw by pabli

smol tweaks for USw screenshot
Install Get Stylus Write a review

Details

Authorpabli

LicenseMIT

Created

Updated

Categoryuserstyles.world

Statistics

Learn how we calculate statistics in the FAQ.

Total views88

Total installs323

Weekly installs13

Description

Some tweaks for userstyles.world

☕ Support me on ko-fi

Notes

Userstyle doesn't have notes.

History

Daily snapshots of style statistics.

2022-03-032022-03-052022-03-062022-03-082022-03-092022-03-102022-03-122022-03-132022-03-142022-03-162022-03-172022-03-18Date0.000.380.751.131.501.882.252.633.00Daily countDaily installsDaily updatesDaily views
2022-03-032022-03-052022-03-062022-03-082022-03-092022-03-102022-03-122022-03-132022-03-142022-03-162022-03-172022-03-18Date1.002.704.305.907.509.2010.8012.4014.00Total countTotal installsTotal views

Source code

/* ==UserStyle==
@name           smol tweaks for USw
@namespace      https://userstyles.world/user/pabli
@version        1.2.0
@description    Some tweaks for userstyles.world
@author         Pabli
@preprocessor   stylus
@var            number    imgsize    "Screenshot size"                           ['%', 75, 50, 100, 1]
@var            select    imgh       "Enlarge screenshot on"                     ["hover", "click", "disabled"]
@var            number    imgsizeh   "Screenshot size on hover"                  ['%', 100, 50, 200, 1]
@var            checkbox  linkimg    "Hide [🔗] from links"                      1
@var            checkbox  history    "Align history charts horizontally"         1
@var            checkbox  scrhide    "Hide scrollbar in Reviews"                 1
@var            checkbox  reviews    "Move reviews under a screenshot"           0
@var            checkbox  reviewsr   "Move reviews to the right of a screenshot" 0
@var            number    maxh       "Reviews height"                            ['rem', 33, 0, null, 0.1]
@var            checkbox  brsp       "Code wrap"                                 0
@var            number    presize    "Source code min-height"                    ['rem', 40, 20, null, 1]
==/UserStyle== */

@-moz-document domain("userstyles.world") {
// remove 🔗 from links
if linkimg {
	a[href^='/link/']::after, 
	a[href^='http']::after {
		content: unset
	}
}
}
@-moz-document url-prefix("https://userstyles.world/style") {
// smaller image
.preview > .card {
	width: imgsize
	transition: 0.3s
}
if imgh == "hover" {
	.preview > .card:hover {
		width: imgsizeh
		cursor: zoom-in
	}
}
if imgh == "click" {
	.preview > .card:active {
		width: imgsizeh
		cursor: zoom-in
	}
}
// history horizontal
if history {
	.history {
		display: flex
		flex-wrap: wrap
	}
	.history > p {
		width: 100%
	}
	.chart {
		width: 50%
	}
}
// hide scrollbar in reviews
if scrhide {
	.Box-body {
		overflow-y: unset
	}
}
// reviews on top
if reviews {
	.wrapper {
		& {
			display: flex
			flex-direction: column
		}
		> .preview {
			order: 0
		}
		> .reviews {
			order: 1
		}
		> section {
			order: 2
		}
		> .reviews {
			max-height: maxh
			overflow: auto
			overflow-x: hidden
			padding-right: 0.25rem
			margin-top: 0.5rem;
		}
		> .reviews > h2,
		> .reviews > a {
			display: none
		}
		//chrome
		.reviews::-webkit-scrollbar {
			width: 0.25rem
			background-color: rgba(0, 0, 0, 0)
		} 
		.reviews::-webkit-scrollbar-thumb {
			background-color: #686868
		}
		.reviews::-webkit-scrollbar-thumb:hover {
			background: #7b7b7b
		}
		//firefox
		.reviews {
			scrollbar-color: #686868
			scrollbar-width: thin
		}
	}
}
// reviews on top to the right
if reviewsr {
	.wrapper {
		& {
			display: flex
			flex-direction: row
			flex-wrap: wrap
		}
		> .preview {
			order: 0
			transition: 0.3s
			z-index: 8
			flex: auto
		}
		> .preview > .card {
			width: 100%
			transition: 0.3s
		}
		if imgh == "hover" {
			> .preview > .card:hover {
				width: 100% - imgsize + imgsizeh
			}
		}
		if imgh == "click" {
			> .preview > .card:active {
				width: 100% - imgsize + imgsizeh
			}
		}
		> .reviews {
			order: 1
			flex-basis: 100% - imgsize
			max-height: maxh
			overflow: auto
			overflow-x: hidden
			padding-left: 0.25rem
			padding-right: 0.25rem
		}
		> .reviews > h2,
		> .reviews > a {
			display: none
		}
		> section:not(.preview):not(.reviews) {
			order: 2
			width: 100%
		}
		.reviews > .Box:first-of-type {
			margin-top: 0
		}
		.preview, .reviews {
			margin-top: 7rem
		}
		.preview > :not(.card) {
			position: absolute
			width: 66%
		}
		.preview > h1 {
			top: 5rem
		}
		.preview > p:first-of-type {
			top: 9rem
		}
		.preview > p {
			top: 11rem
		}
		//chrome
		.reviews::-webkit-scrollbar {
			width: 0.25rem
			background-color: rgba(0, 0, 0, 0)
		} 
		.reviews::-webkit-scrollbar-thumb {
			background-color: #686868
		}
		.reviews::-webkit-scrollbar-thumb:hover {
			background: #7b7b7b
		}
		//firefox
		.reviews {
			scrollbar-color: #686868
			scrollbar-width: thin
		}
	}
}
pre {
	min-height: presize
	overflow: auto
}
if brsp {
	code {
		white-space: break-spaces
	}
}

}

Reviews

No reviews yet.