Codeforces Optimal Theme

Easy to read and saves your eyes. Most colors and styles of elements are choosed using Golden Ratio Technique. Currently doesn't support Codeforces Blog.

Устаревшая версия за 27.03.2021. Перейдите к последней версии.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey, Greasemonkey или Violentmonkey.

Для установки этого скрипта вам необходимо установить расширение, такое как Tampermonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Violentmonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Userscripts.

Чтобы установить этот скрипт, сначала вы должны установить расширение браузера, например Tampermonkey.

Чтобы установить этот скрипт, вы должны установить расширение — менеджер скриптов.

(у меня уже есть менеджер скриптов, дайте мне установить скрипт!)

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

(у меня уже есть менеджер стилей, дайте мне установить скрипт!)

// ==UserScript==
// @name Codeforces Optimal Theme
// @version 4.8
// @description Easy to read and saves your eyes. Most colors and styles of elements are choosed using Golden Ratio Technique. Currently doesn't support Codeforces Blog.
// @author Roman Lukyanchikov
// @match http://codeforces.com/*
// @match https://codeforces.com/*
// @match http://m1.codeforces.com/*
// @match https://m1.codeforces.com/*
// @match http://m2.codeforces.com/*
// @match https://m2.codeforces.com/*
// @match http://m3.codeforces.com/*
// @match https://m3.codeforces.com/*
// @exclude http://codeforces.com/blog/*
// @exclude https://codeforces.com/blog/*
// @exclude http://codeforces.com/comments/*
// @exclude https://codeforces.com/comments/*
// @exclude http://codeforces.com/10years?comments=true#comments
// @exclude https://codeforces.com/10years?comments=true#comments
// @grant GM_addStyle
// @run-at document-start
// @namespace https://greasyfork.org/users/687494
// ==/UserScript==

document.getElementsByTagName('head')[0].innerHTML += '<link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;700&display=swap&family=PT+Sans+Caption:wght@400;700&display=swap" rel="stylesheet"> ';
GM_addStyle("body {background-color: hsl(0, 0%, 81%) !important; color: black; font-family: 'PT Sans Caption', sans-serif !important;}");
GM_addStyle(".roundbox.menu-box {border: 1px solid gray !important; background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle(".roundbox pre {background-color: white !important;}");
GM_addStyle("div.source-copier {color: white !important; border-color: gray !important; background-color: hsl(0, 0%, 19%) !important; border-radius: 6px !important;}");
GM_addStyle("div.source-copier:hover {color: black !important; border-color: hsl(0, 0%, 81%) !important; background-color: white !important; border-radius: 6px !important;}");
GM_addStyle("div.roundbox.highlight-blue.sidebox.smaller {background-color: #CFE7FF !important;}");
GM_addStyle(".ttypography {color: black !important; font-family: 'PT Sans Caption', sans-serif !important;}");
GM_addStyle(".ttypography .problem-statement .header {color: black !important; font-family: 'PT Sans Caption', sans-serif !important;}");
GM_addStyle(".ttypography .problem-statement .header .title {color: black !important; font-family: 'PT Sans Caption', sans-serif !important;}");
GM_addStyle(".ttypography a:hover {background-color: #B0D7FF !important;}");
GM_addStyle(".ttypography a:focus {background-color: #B0D7FF !important;}");
GM_addStyle(".datatable td .notice.small {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".datatable thead {background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle("span.notice {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("div.notice {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".custom-links-pagination a {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".custom-links-pagination .active {color: black !important;}");
GM_addStyle(".roundbox .roundbox-lt {background: none !important;}");
GM_addStyle(".roundbox .roundbox-rt {background: none !important;}");
GM_addStyle(".roundbox .roundbox-lb {background: none !important;}");
GM_addStyle(".roundbox .roundbox-rb {background: none !important;}");
GM_addStyle(".roundbox {border: 1px solid gray !important; background-color: hsl(0, 0%, 69%) !important; border-radius: 6px !important;}");
GM_addStyle(".topic .notice {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".topic .title p {color: black !important; font-family: 'PT Sans Caption', sans-serif !important; font-size: 1em !important;}");
GM_addStyle(".menu-box .search {color: hsl(0, 0%, 81%) !important; border: 2px solid hsl(0, 0%, 31%); border-radius: 5px; background: hsl(0, 0%, 81%) url(https://codeforces.com/images/search-16x16.png) 2px 2px no-repeat}");
GM_addStyle(".contest-state-phase {color: #0067CF !important;}");
GM_addStyle(".roundbox .caption {color: #0067CF !important;}");
GM_addStyle(".roundbox.meta {border: 1px solid gray !important; background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle(".left-meta span {color: #009100;}");
GM_addStyle(".ttypography p {line-height: 1.62em !important; font-family: 'PT Sans Caption', sans-serif !important;}");
GM_addStyle(".topic .content {border-left: 6px solid hsl(0, 0%, 69%) !important; !important; font-size: 1em !important; line-height: 1.62em !important;}");
GM_addStyle(".countdown {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".propertyLinks span {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".roundbox .titled {border-bottom: 1px solid gray !important;}");
GM_addStyle(".roundbox .dark {background-color: hsl(0, 0%, 81%) !important;}");
GM_addStyle(".roundbox .bottom-links {background-color: hsl(0, 0%, 69%) !important; border: none !important;}");
GM_addStyle(".handleForm input {background-color: hsl(0, 0%, 19%) !important; color: hsl(0, 0%, 81%) !important; border: 2px solid hsl(0, 0%, 31%) !important; !important; border-radius: 5px !important;}");
GM_addStyle(".pagination span.active {background-color: hsl(0, 0%, 69%) !important; border: none !important;}");
GM_addStyle(".lang-chooser div {background-color: hsl(0, 0%, 81%) !important;}");
GM_addStyle(".highlights {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".search-help code {background: hsl(0, 0%, 81%) !important; border: none !important; }");
GM_addStyle(".search-large {background: hsl(0, 0%, 81%) url(https://codeforces.com/images/search-24x24.png) 2px 2px no-repeat !important; color: hsl(0, 0%, 31%) !important; border: none !important;}");
GM_addStyle(".ac_over {background-color: hsl(0, 0%, 19%) !important; color: white !important;}");
GM_addStyle(".ac_odd {background-color: hsl(0, 0%, 81%);}");
GM_addStyle(".ac_even {background-color: hsl(0, 0%, 69%);}");
GM_addStyle(".button-up {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".menu-list li.current {border-bottom: 3px solid hsl(0, 0%, 19%) !important;}");
GM_addStyle(".menu-list li a, .menu-list li a:visited {color: black !important;}");
GM_addStyle(".contest-name a, .contest-name a:visited {color: hsl(0, 0%, 19%) !important;}");
GM_addStyle(".title-photo div {border: none !important;}");
GM_addStyle(".main-info div {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".roundbox .rtable td {border: none !important;}");
GM_addStyle(".roundbox .rtable th {border: none !important; border-top: none !important;}");
GM_addStyle(".datatable {background-color: hsl(0, 0%, 69%) !important; border: 1px solid gray !important; border-radius: 6px !important;}");
GM_addStyle(".datatable tbody {background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle(".datatable tbody .dark {background-color: hsl(0, 0%, 81%);}");
GM_addStyle(".lt {background: none !important;}");
GM_addStyle(".rt {background: none !important;}");
GM_addStyle(".lb {background: none !important;}");
GM_addStyle(".rb {background: none !important;}");
GM_addStyle(".ilt {background: none !important;}");
GM_addStyle(".irt {background: none !important;}");
GM_addStyle(".ilb {background: none !important;}");
GM_addStyle(".irb {background: none !important;}");
GM_addStyle(".contests-table {background: hsl(0, 0%, 81%)}");
GM_addStyle(".comment-table .reply a {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".vote-for-comment img {opacity: 0.81 !important;}");
GM_addStyle(".comment-table {border-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle(".problem-statement .sample-tests pre {background-color: hsl(0, 0%, 19%) !important; color: white !important;}");
GM_addStyle(".input-output-copier {border-color: gray !important;}");
GM_addStyle(".problem-statement .sample-tests .title .input-output-copier {color: white !important; border-color: gray !important; background-color: hsl(0, 0%, 19%) !important; border-radius: 6px !important;}");
GM_addStyle(".problem-statement .sample-tests .title {color: black !important; border-color: gray !important; background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle(".problem-statement .sample-tests .title .input-output-copier:hover {color: black !important; border-color: hsl(0, 0%, 81%) !important; background-color: white !important; border-radius: 6px !important;}");
GM_addStyle(".problem-statement .sample-tests .input, .problem-statement .sample-tests .output {border-color: gray !important;}");
GM_addStyle(".title {border-color: gray !important;}");
GM_addStyle(".verdict-accepted {color: #009100 !important;}");
GM_addStyle(".verdict-rejected {color: blue !important;}");
GM_addStyle(".verdict-waiting {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".verdict-accepted-challange {color: #009100 !important;}");
GM_addStyle(".verdict-successful-challenge {color: #009100 !important;}");
GM_addStyle("span.verdict-unsuccessful-challenge {color: blue !important;}");
GM_addStyle(".accepted-problem {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".datatable td {border-color: gray !important;}");
GM_addStyle(".datatable td[background-color^='none'], .datatable th[background-color^='none'] {background: hsl(0, 0%, 81%) !important; background-color: hsl(0, 0%, 81%) !important;}");
GM_addStyle(".datatable th {border-color: gray !important;}");
GM_addStyle(".datatable td.state[style^='back'] .notice {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".contest-state-regular.countdown {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".roundbox .rtable td .contest-state-regular {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("a:link.notice {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".problems tr.accepted-problem td.act {background-color: #80FF80 !important;}");
GM_addStyle(".problems tr.accepted-problem td.id {border-left-color: #80FF80 !important;}");
GM_addStyle(".problems tr.rejected-problem td.act {background-color: #FF8080 !important;}");
GM_addStyle(".problems tr.rejected-problem td.id {border-left-color: #FF8080 !important;}");
GM_addStyle(".datatable td.state[style^='background-color: rgb(221, 238, 255);'] {background-color: #CFE7FF !important;}");
GM_addStyle(".datatable td.state[style^='background-color: rgb(212, 237, 201);'] {background-color: #80FF80 !important;}");
GM_addStyle(".setting-name {color: #0067CF !important;}");
GM_addStyle(".ProblemRating {color: black !important;}");
GM_addStyle(".standings .cell-accepted {color: #009100 !important;}");
GM_addStyle(".standings .cell-accepted-locked {color: #004F00 !important;}");
GM_addStyle(".standings .cell-passed-system-test {color: #009100 !important;}");
GM_addStyle("span.cell-rejected {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".standings .cell-challenged {color: red !important;}");
GM_addStyle(".cell-time {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".unsuccessfulChallengeCount {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".sidebar-menu ul li {border: none !important;}");
GM_addStyle(".sidebar-menu ul li:hover {border: 1px solid gray !important; background-color: hsl(0, 0%, 81%) !important; color: black !important;}");
GM_addStyle(".comment-table.highlight-blue, .comment-table.highlight, .standings tr.highlighted-row td, table tr.highlighted-row td, .highlight-blue, .lang-chooser div[style^='background-color: #EAF4FF;'] {background-color: #CFE7FF !important;}");
GM_addStyle("select {background-color: hsl(0, 0%, 81%) !important; color: black !important;}");
GM_addStyle("input {background-color: hsl(0, 0%, 81%) !important; color: black !important;}");
GM_addStyle("textarea {background-color: hsl(0, 0%, 81%) !important; color: black !important;}");
GM_addStyle(".topic div[style^='font-size: 1.1rem;line-height: 1.1rem;padding-bottom: 0.5em;'] img {filter: invert(0.69) !important;}");
GM_addStyle("img[title^='Attach this blog to some contest as a resource'] {filter: invert(0.69) !important;}");
GM_addStyle("img[title^='Прикрепить данный блог к какому-либо соревнованию'] {filter: invert(0.69) !important;}");
GM_addStyle("div[style^='width:35em;margin-left:auto;'] {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("#facebox .content, .talk-content div[id^='history-text-content'] {background: hsl(0, 0%, 81%) !important; background-color: hsl(0, 0%, 81%) !important;}");
GM_addStyle("a:not([href]):not(.rated-user), a:link:not(.rated-user) {color: #0058B0;}");
GM_addStyle("a:visited:not(.rated-user) {color: #3737B0 !important;}");
GM_addStyle("div.ttypography {font-family: 'PT Sans Caption', sans-serif !important;}");
GM_addStyle("div.ttypography .bordertable tbody td {border: 1px solid gray !important;}");
GM_addStyle("div.ttypography .bordertable tbody th {border: 1px solid gray !important;}");
GM_addStyle("div.ttypography .bordertable tbody tr:hover td {background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle("div.ttypography .bordertable tbody tr:hover th {background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle(".datatable td[style^='background-color: rgb(212, 237, 201);'] {background-color: #B0FFB0 !important;}");
GM_addStyle(".datatable td[style^='background-color: rgb(255, 227, 227);'] {background-color: #FFB0B0 !important;}");
GM_addStyle(".left-meta span[style^='font-size:larger;position:relative;bottom:1px;font-weight:bold;color:gray'] {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle(".contestParticipantCountLinkMargin img {filter: invert(0) !important;}");
GM_addStyle("li span[style^='color:#009100;font-weight:bold;'] {color: #009100 !important;}");
GM_addStyle("span[style^='color:gray;font-weight:bold;'] {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("span[style^='color:green;font-weight:bold;'] {color: #009100 !important;}");
GM_addStyle("a:visited[style^='text-decoration: none;font-size: 18.0px;background-color: rgb(1,87,155);color: white;font-weight: bold;padding: 0.5em 1.0em;'] {color: white !important;}");
GM_addStyle("a:link.red-link, a:link.red-link:visited, .red-link, a.red-link:visited {background-color: hsl(0, 0%, 19%) !important; color: yellow !important;}");
GM_addStyle(".rated-user.user-black {font-family: 'Montserrat Alternates', sans-serif !important; font-weight: 400 !important;}");
GM_addStyle(".rated-user {font-family: 'Montserrat Alternates', sans-serif !important; font-weight: 700 !important;}");
GM_addStyle("tr.user-orange td, span.user-orange, a.user-orange {color: #E05A00 !important;}");
GM_addStyle("tr.user-violet td, span.user-violet, a.user-violet {color: darkviolet !important;}");
GM_addStyle("tr.user-cyan td, span.user-cyan, a.user-cyan {color: darkcyan !important;}");
GM_addStyle("tr.user-gray td, span.user-gray, a.user-gray {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("tr.user-green td, span.user-green, a.user-green {color: green !important;}");
GM_addStyle("tr.user-blue td, span.user-blue, a.user-blue {color: blue !important;}");
GM_addStyle("tr.user-red td, span.user-red, a.user-red {color: #CF2727 !important;}");
GM_addStyle("tr.user-legendary td, span.user-legendary, a.user-legendary {color: #CF2727 !important;}");
GM_addStyle(".sidebar-menu ul li.active {background-color: gray !important; border: 1px solid hsl(0, 0%, 31%) !important;}");
GM_addStyle(".highlight-blue.roundbox {background-color: #FFFFCF !important;}");
GM_addStyle("div[style^='font-size:2em;color:#3B5998;float:right;'] {color: #0067CF !important;}");
GM_addStyle("div .topic .title a, div .topic .title a:hover {color: #0067CF !important;}");
GM_addStyle("div .topic .title a:visited {color: #3737B0 !important;}");
GM_addStyle("div[style^='text-align:right;color:#888;font-size:1.1rem;margin-bottom:0.25em;'] {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("span[style^='color: darkorange; font-weight: bold;'] {color: olive !important;}");
GM_addStyle(".contest-name {color: black !important;}");
GM_addStyle(".contest-name a {font-size: 1em !important; color: black !important; font-family: 'PT Sans Caption', sans-serif !important;}");
GM_addStyle(".contest-name a:visited {font-size: 1em !important; color: black !important; font-family: 'PT Sans Caption', sans-serif !important;}");
GM_addStyle("._StreamsSidebarFrame_countdown._StreamsSidebarFrame_timeMark {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("._StreamsSidebarFrame_active._StreamsSidebarFrame_timeMark {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("._StreamsSidebarFrame_stream {border-bottom: 1px solid gray !important;}");
GM_addStyle("ins[style^='background:#80ff80;overflow-wrap:break-word;'] {background: #B0FFB0 !important;}");
GM_addStyle("del[style^='background:#ff8080;overflow-wrap:break-word;'] {background: #FFB0B0 !important;}");
GM_addStyle("input[class^='submit'] {background: hsl(0, 0%, 31%) !important; border: none !important; border-radius: 6px !important; color: white !important;}");
GM_addStyle("input[class^='submit']:hover {background: hsl(0, 0%, 19%) !important; border: 2px solid hsl(0, 0%, 31%) !important; border-radius: 6px !important; color: white !important;}");
GM_addStyle(".header-bell__img {filter: brightness(0.81)}");
GM_addStyle(".fieldset, img[alt='Codeforces'] {filter: brightness(0.81)}");
GM_addStyle("img[alt='Necropost'] {filter: brightness(0.69)}");
GM_addStyle("img[alt='Некропост'] {filter: brightness(0.69)}");
GM_addStyle("img[src='//assets.codeforces.com/images/hsu.png'] {filter: brightness(0.81)}");
GM_addStyle("img[src='//assets.codeforces.com/images/technocup-logo.png'] {filter: brightness(0.81)}");
GM_addStyle(".header-bell .bell-details__no-new {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("div.spoiler-content {background-color: lightgoldenrodyellow !important;}");
GM_addStyle("._MashupContestEditFrame_frame p {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("._MashupContestEditFrame_frame div._MashupContestEditFrame_title {color: #0067CF !important;}");
GM_addStyle("._UserActivityFrame_frame .userActivityRoundBox ._UserActivityFrame_header {color: hsl(0, 0%, 31%) !important}");
GM_addStyle("._UserActivityFrame_frame .userActivityRoundBox ._UserActivityFrame_footer ._UserActivityFrame_counterDescription {color: hsl(0, 0%, 31%) !important}");
GM_addStyle("._UserActivityFrame_frame .userActivityRoundBox #userActivityGraph svg text {fill: hsl(0, 0%, 31%) !important}");
GM_addStyle("._UserActivityFrame_caption {color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("input {background-color: hsl(0, 0%, 19%) !important; color: hsl(0, 0%, 81%) !important; border: 2px solid hsl(0, 0%, 31%) !important; border-radius: 5px !important;}");
GM_addStyle("select {background-color: hsl(0, 0%, 19%) !important; color: hsl(0, 0%, 81%) !important; border: 2px solid hsl(0, 0%, 31%) !important; border-radius: 5px !important;}");
GM_addStyle("img.delete-resource-link {filter: invert(0.19);}");
GM_addStyle("#vote-list-filterDifficultyLowerBorder {filter: brightness(0.69)");
GM_addStyle("#vote-list-filterDifficultyUpperBorder {filter: brightness(0.69)");
GM_addStyle("div[style='margin-top: 0.85em;padding-top:0.85em;border-top: 1px solid rgb(185, 185, 185);position: relative;'] {border-top: 1px solid gray !important}");
GM_addStyle("div[style='text-align:center;border-bottom: 1px solid rgb(185, 185, 185);margin:0 -0.5em 0.5em -0.5em;padding: 0 1em 0.5em 1em;'] {border-bottom: 1px solid gray !important}");
GM_addStyle("span.small {color: hsl(0, 0%, 31%) !important}");
GM_addStyle("header nav {background-color: hsl(0, 0%, 69%) !important; color: #303030 !important; border: 1px solid gray !important;}");
GM_addStyle("._IndexPage_notice {background-color: hsl(60, 100%, 84%) !important}");
GM_addStyle(".datatable .caption {background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle(".datatable._IndexPage_contests tbody tr:nth-child(2n-1) {background-color: hsl(0, 0%, 81%) !important;}");
GM_addStyle(".datatable._ProblemsPage_problems tbody tr:nth-child(2n-1) {background-color: hsl(0, 0%, 81%) !important;}");
GM_addStyle(".form-box {border: 1px solid gray !important; background-color: hsl(0, 0%, 69%) !important;}");
GM_addStyle(".form-box .header {border-bottom: 1px solid gray !important; color: hsl(0, 0%, 31%) !important;}");
GM_addStyle("footer {border-top: 1px solid hsl(0, 0%, 69%) !important}");
GM_addStyle("#footer {border-top: 1px solid hsl(0, 0%, 69%) !important}");