Better StackOverflow

adds outline to code blocks, ad block, no cookie modal.

От 12.01.2023. Виж последната версия.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey, Greasemonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Userscripts.

За да инсталирате скрипта, трябва да инсталирате разширение като Tampermonkey.

За да инсталирате този скрипт, трябва да имате инсталиран скриптов мениджър.

(Вече имам скриптов мениджър, искам да го инсталирам!)

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

(Вече имам инсталиран мениджър на стиловете, искам да го инсталирам!)

/* ==UserStyle==
@name Better StackOverflow
@description adds outline to code blocks, ad block, no cookie modal.
@author NotYou
@match *://stackoverflow.com/*
@match *://*.stackoverflow.com/*
@match *://stackexchange.com/*
@match *://superuser.com/*
@match *://serverfault.com/*
@match *://askubuntu.com/*
@match *://stackapps.com/*
@match *://mathoverflow.net/*
@namespace -
@version 1.0.0
@license GPL-3.0-or-later
==/UserStyle== */

/* Darked Accepted Mark Background in questions list */

.s-post-summary--stats .s-post-summary--stats-item.has-answers.has-accepted-answer {
  background-color: var(--green-600);
  border-color: var(--green-600);
}

/* Ad Block */

.img_ad, #dfp-tsb, #dfp-smlb, #dfp-tlb, #dfp-mlb, .js-report-ad-button-container, .adsbox,

/* Cookie */

.js-consent-banner {
  display: none !important;
}

.js-tag-editor.tag-editor.multi-line.s-input {
  width: 100% !important;
}

/* Code Outline */

.default.s-code-block {
  --color: rgba(0, 0, 0, .2);
}

[class*="lang-"] {
  border: 2px solid var(--color);
}

[class*="lang-"]::after {
  content: '\a'var(--content);
  color: var(--color) !important;
  padding: 2px 5px 5px 5px;
  font-weight: 800;
}

.snippet-code [class*="lang-"]::after {
  content: '\a\a'var(--content);
}

.s-code-block::after {
    font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.lang-none {
  --content: "Plain";
  --color: rgb(100, 0, 0);
}

.lang-js {
  --color: rgb(247, 223, 30);
  --content: "JS";
}

.lang-js::after {
  color: rgb(0, 0, 0);
}

.lang-html {
  --color: rgb(242, 103, 44);
  --content: "HTML";
}

.lang-css {
  --color: rgb(52, 169, 222);
  --content: "CSS";
}

.lang-java {
  --color: rgb(234, 146, 5);
  --content: "Java";
}


.lang-py {
  --color: rgb(54, 119, 173);
  --content: "Python";
}

.lang-cpp {
  --color: rgb(101, 154, 210);
  --content: "C++";
}

.lang-cs, .lang-csharp {
  --color: rgb(93, 108, 189);
  --content: "C#";
}

.lang-c {
  --color: rgb(93, 108, 189);
  --content: "C";
}

.lang-php {
  --color: rgb(93, 108, 189);
  --content: "PHP";
}

.lang-rb {
  --color: rgb(174, 21, 5);
  --content: "Ruby";
}

.lang-r {
  --color: rgb(35, 105, 190);
  --content: "R";
}

.lang-perl {
  --color: rgb(66, 68, 109);
  --content: "Perl";
}

.lang-bsh {
  --color: rgb(41, 48, 54);
  --content: "Bash";
}

.lang-kotlin {
  --color: rgb(117, 114, 227);
  --content: "Kotlin";
}

.lang-rust {
  --color: rgb(0, 0, 0);
  --content: "Rust";
}

.lang-regex {
  --color: rgb(64, 209, 178);
  --content: "RegEx";
}

.lang-sql {
  --color: rgb(192, 207, 212);
  --content: "SQL";
}

.lang-pascal {
  --color: rgb(50, 96, 160);
  --content: "Pascal";
}

.lang-vb {
  --color: rgb(60, 110, 179);
  --content: "VB";
}

.lang-xml {
  --color: rgb(0, 95, 174);
  --content: "XML";
}

.lang-lua {
  --color: rgb(0, 0, 128);
  --content: "Lua";
}

.lang-go {
  --color: rgb(106, 215, 228);
  --content: "Go";
}

.lang-swift {
  --color: rgb(250, 42, 31);
  --content: "Swift";
}