Skip to content

Coolakov Fixes2 by GreatFireDragon

Screenshot of Coolakov Fixes2

Details

AuthorGreatFireDragon

LicenseMIT

Categoryhttps://coolakov.ru/tools/most_promoted/

Created

Updated

Size16 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

New CSS specifically for userscript "Coolakov Fixes2"

Notes

Userstyle doesn't have notes.

Source code

Source code has over 10K characters, so we truncated it. You can inspect the full source code on install link.
/* ==UserStyle==
@name         Coolakov Fixes2
@version      20241107.07.48
@namespace    coolakov
@description  New CSS specifically for userscript "Coolakov Fixes2"
@author       GreatFirDragon
@license      MIT
@preprocessor default

@var range GFD-url-ratio "URL %" ['', 4, 0, 10, 1]
@var range GFD-title-ratio "Title %" ['', 3, 0, 10, 1]
@var range GFD-desc-ratio "Desc %" ['', 3, 0, 10, 1]

@var color GFD-goodActive-bg "Цвет 👍" #7ae96b50
@var color GFD-neutralActive-bg "Цвет 🤔" #f1fffd
@var color GFD-badActive-bg "Цвет 👎" #eaeaea

@var range GFD-query-form-font-size "Размер шрифта слева" ['px', 14, 8, 30, 1]

@var color GFD-highlight1-bg "Цвет регулярки 1" #c48fea90
@var color GFD-highlight2-bg "Цвет регулярки 2" #eaeaea
@var color GFD-highlight3-bg "Цвет регулярки 3" #f1fffd
@var color GFD-highlight4-bg "Цвет регулярки 4" #eaeaea
@var color GFD-highlight5-bg "Цвет регулярки 5" #f1fffd

@var range GFD-title-size "Размер тайтла" ['px', 14, 8, 30, 1]
@var range GFD-title-lines "Title lines" ['', 2, 0, 5, 1]

@var range GFD-desc-size "Размер деска" ['px', 11, 8, 30, 1]
@var range GFD-desc-lines "Desc lines" ['', 3, 0, 5, 1]
==/UserStyle== */
@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* root переменные */
:root {
	
		/* Step 1: Calculate the sum of the initial ratios */
		--ratio-sum: calc(var(--GFD-url-ratio) + var(--GFD-title-ratio) + var(--GFD-desc-ratio));
		/* Step 2: Calculate the normalized base unit */
		--normalized-base: calc(97.5% / var(--ratio-sum));
		/* Step 3: Normalize each ratio */
		--normalized-url-ratio: calc(var(--GFD-url-ratio) * var(--normalized-base));
		--normalized-title-ratio: calc(var(--GFD-title-ratio) * var(--normalized-base));
		--normalized-desc-ratio: calc(var(--GFD-desc-ratio) * var(--normalized-base));
	
		--GFD-ellipsis-button-bg: #dbdbdb8c;
    --GFD-border-radius: 5px;
    --GFD-linksControl-button-bg: #3a7fba;
    --GFD-linksControl-button-color: #0b2d4b;
    --GFD-title-error-color: #ff000024;
    --GFD-input-range-bg: #ddd;
    --GFD-input-select-bg: #fff;
    --GFD-specialButton-bg: #4CAF50;
    --GFD-specialButton-hover-bg: #45a049;
    --GFD-specialButton-color: white;
		--GFD-highlight-color: #000000b5
		--GFD-highlight-div-bg: #ffffff26
	} }
@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Раскраска строк good-bad */
    tr:has(button.GFD_goodActive) > *,
    tr:has(button.GFD_goodActive) > * > * {
        background-color: var(--GFD-goodActive-bg) !important;
    }
    td:has(button.GFD_goodActive) a > * {
        color: unquote('color-mix(in srgb, var(--GFD-goodActive-bg) 60%, black)') !important;

    }

    tr:has(button.GFD_neutralActive) > *,
    tr:has(button.GFD_neutralActive) > * > * {
        background-color: var(--GFD-neutralActive-bg) !important;
    }
    td:has(button.GFD_neutralActive) a > * {
        color: unquote('color-mix(in srgb, var(--GFD-neutralActive-bg) 60%, black)') !important;
    }

    tr:has(button.GFD_badActive) > *,
    tr:has(button.GFD_badActive) > * > * {
        background-color: var(--GFD-badActive-bg) !important;
    }
    td:has(button.GFD_badActive) a > * {
        color: unquote('color-mix(in srgb, var(--var(--GFD-badActive-bg)) 60%, black)') !important;
    }
		/* закругление */
		tr:has(button.GFD_badActive) > * > * {
				border-radius: GFD-border-radius;
		}
	
		/* 	Отлкюченные кнопки	 */
		button[disabled] {
        opacity: 0.1;
    }
}

@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Подсветка ссылок регулярок */
    div:has(> a[class^="GFD_highlight"]) {
        border-radius: GFD-border-radius;
    }

    td:has(a.GFD_highlight1) {background-color: var(--GFD-highlight1-bg) !important;}
    div:has(> a.GFD_highlight1) {background: var(--GFD-highlight-div-bg);}
    a.GFD_highlight1 * {color: var(--GFD-highlight-color) !important;}

    td:has(a.GFD_highlight2) {background-color: var(--GFD-highlight2-bg) !important;}
    div:has(> a.GFD_highlight2) {background: var(--GFD-highlight-div-bg);}
    a.GFD_highlight2 * {color: var(--GFD-highlight-color) !important;}

    td:has(a.GFD_highlight3) {background-color: var(--GFD-highlight3-bg) !important;}
    div:has(> a.GFD_highlight3) {background: var(--GFD-highlight-div-bg);}
    a.GFD_highlight3 * {color: var(--GFD-highlight-color) !important;}
	
		td:has(a.GFD_highlight4) {background-color: var(--GFD-highlight4-bg) !important;}
    div:has(> a.GFD_highlight4) {background: var(--GFD-highlight-div-bg);}
    a.GFD_highlight4 * {color: var(--GFD-highlight-color) !important;}
	
		td:has(a.GFD_highlight5) {background-color: var(--GFD-highlight5-bg) !important;}
    div:has(> a.GFD_highlight5) {background: var(--GFD-highlight-div-bg);}
    a.GFD_highlight5 * {color: var(--GFD-highlight-color) !important;}

		/* Стили для textarea регулярок */
		#highlightRegExpTextarea1 {background-color: var(--GFD-highlight1-bg);}
    #highlightRegExpTextarea2 {background-color: var(--GFD-highlight2-bg);}
    #highlightRegExpTextarea3 {background-color: var(--GFD-highlight3-bg);}
		#highlightRegExpTextarea4 {background-color: var(--GFD-highlight4-bg);}
    #highlightRegExpTextarea5 {background-color: var(--GFD-highlight5-bg);}

    #highlightRegExpTextarea1,
    #highlightRegExpTextarea2,
    #highlightRegExpTextarea3,
		#highlightRegExpTextarea4,
		#highlightRegExpTextarea5 {
        width: 100%;
				margin: 1px 0;
        font-family: monospace;
				font-size: var(--GFD-query-form-font-size);
    }
}

@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Стили для класса ellipsis */
    .ellipsis {
        display: flex !important;
        flex-direction: row-reverse !important;
        justify-content: start !important;
        align-content: start !important;
		gap: 0.1em;
    }
    .ellipsis > a {
        margin-left: 1rem;
        flex-grow: 1;
        display: flex;
        gap: 0.8rem;
    }
    .ellipsis > a > span:nth-child(even) {
        font-weight: bold;
    }
    .ellipsis > button {
        border: none;
        background-color: var(--GFD-ellipsis-button-bg);
        border-radius: var(--GFD-border-radius);
        transition: 0.2s;
    }
    .ellipsis > button:hover {filter: brightness(90%);}

}

@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Стили для управления ссылками */
    .GFD_linksControl {
        display: flex;
        flex-direction: column;
        padding-left: 5px;
    }
    .GFD_linksControl > button {
        margin: 1px 0;
        border-radius: var(--GFD-border-radius);
        border: 0;
        color: black;
				font-size: var(--GFD-query-form-font-size)
    }
		.GFD_linksControl > button:nth-child(2) { background-color: var(--GFD-goodActive-bg); }
		.GFD_linksControl > button:nth-child(4) { background-color: var(--GFD-neutralActive-bg); }
		.GFD_linksControl > button:nth-child(6) { background-color: var(--var(--GFD-badActive-bg)); }
		.GFD_linksControl > button:nth-child(7) { background-color: lightgrey; }	
    .GFD_linksControl > button[disabled] {
        background-color: blue !important;
        color: blue !important;
    }
    .GFD_linksControl > textarea:nth-child(1),
    .GFD_linksControl > textarea:nth-child(3),
    .GFD_linksControl > textarea:nth-child(5) {
        display: none;
    }
}

@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Скрытые домены */
    tr:has(img.GFD_hiddenDomain) {
        visibility: visible !important;
        opacity: 0.1;
    }
}
@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Выравнивание колонок */
    main.main {
        display: flex;
        flex-direction: row-reverse;
        justify-content: flex-start;
    }
    main.main > div.container:first-child {
        flex-grow: 1;
    }
	.container {padding: 0 5px;}
}
@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* #myform */
  #myform, #result {
		margin: 10px 0 0 5px;
		padding: 0;
	}
	#result > div:first-child
	{margin: 0;}
	.chosen-container-single {
        width: 100% !important;
    }
	.form-group {margin: 0 0 5px 0; font-size: var(--GFD-query-form-font-size);}
	.form-group > br,	.form-group > label {display: none;}
}
@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Настройка описания */
    .white {
        display: flex;
        gap: 1.5em;
        padding: 0 0 0 40rem;
        border: none;
    }
    .white > p, .white + div {
        margin: 0;
        height: 0;
    }
}
@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Настройка фавиконов */
	.table > tbody > tr > td:first-child > img {
        cursor: pointer;
        transition: 0.5s;
				margin-left: 0.5em;
        height: 3rem;
				overflow: hidden;
    }
  .table > tbody > tr > td > img:hover {
        translate: 0 1px;
        opacity: 0.5;
    }
}

@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Расположение панели навигации */
    #navbar-header {
        display: flex !important;
        justify-content: space-between;
    }
    #navbar-header :nth-child(1) {
        order: -99;
    }
    #navbar-header :nth-child(2) {
        order: 99;
    }
    #navbar-header > * {
        border-radius: var(--GFD-border-radius);
    }
}

@-moz-document url-prefix("https://coolakov.ru/tools/most_promoted/") { /* Стили полей ввода диапазона */
    #GFD_layoutRatio,
    #GFD_fontSize {
        -webkit-appearance: none;
        appearance: none;
        width: 15ch;
        background-color: var(--GFD-input-range-bg);
        outline: none;
    }
    #GFD_layoutRatio::-webkit-slider-thumb,
    #GFD_fontSize::-webkit-slider-thumb {
        cursor: pointer;
    }...

Reviews

No reviews yet.