Skip to content

Instantly share code, notes, and snippets.

@scturtle
Created December 1, 2023 06:39
Show Gist options
  • Save scturtle/e33bf7702f15e598e3f58437af1f493d to your computer and use it in GitHub Desktop.
Save scturtle/e33bf7702f15e598e3f58437af1f493d to your computer and use it in GitHub Desktop.
adventofcode daylight mode userscript
// ==UserScript==
// @name adventofcode daylight mode
// @namespace Violentmonkey Scripts
// @match https://adventofcode.com/*
// @grant none
// @version 1.0
// @author scturtle
// @description 2023/11/27 16:52:13
// ==/UserScript==
let css = `
:root {
--fg: #666;
}
body {
font-family: "Berkeley Mono", monospace;
background: #fff;
color: var(--fg);
}
pre, code {
font-family: "Berkeley Mono", monospace;
}
a {
text-decoration: underline;
color: var(--fg);
}
a:hover,
a:focus {
color: var(--fg);
text-decoration: underline;
background-color: rgba(119, 119, 165, .1);
}
code:before {
border: 1px solid #aaa;
background: rgba(119, 119, 165, .1);
}
.warning-active {
color: #ff0000;
}
.star-count,
.supporter-badge {
color: var(--fg);
text-shadow: 0 0 5px #ffff66;
}
a.supporter-badge:hover,
a.supporter-badge:focus {
text-decoration: underline;
color: var(--fg);
text-shadow: 0 0 5px #ffff66;
}
.sponsor-badge {
color: #79a2d8;
}
a.sponsor-badge:hover,
a.sponsor-badge:focus {
text-decoration: none;
color: #79a2d8;
text-shadow: 0 0 5px #ccdbed;
}
header h1 a,
header h1 span,
header h1 a:hover,
header h1 a:focus {
color: var(--fg);
text-shadow: 0 0 2px #ffff66, 0 0 5px #ffff66;
}
input[type="text"],
textarea {
color: var(--fg);
border: 1px solid #666666;
background: #fff;
}
input[type="radio"]:checked ~ span,
input[type="checkbox"]:checked ~ span {
color: var(--fg);
}
input[type="radio"] ~ span:hover,
input[type="radio"] ~ span:focus,
input[type="checkbox"] ~ span:hover,
input[type="checkbox"] ~ span:focus {
background-color: rgba(119, 119, 165, .1);
}
article h2 {
color: var(--fg);
}
article em {
color: var(--fg);
text-shadow: 0 0 5px #666;
}
article em.star {
color: var(--fg);
text-shadow: 0 0 5px #ffff66;
}
.day-success {
color: var(--fg);
text-shadow: 0 0 5px #ffff66;
}
.share,
.share:hover,
.share:focus-within {
color: #009900;
}
.puzzle-input {
border: 1px solid #999999;
background: #fff;
color: var(--fg);
text-shadow: 0 0 5px #000;
}
.calendar > a {
text-decoration: none;
color: var(--fg);
}
.calendar a:hover,
.calendar a:focus {
background-color: rgba(119, 119, 165, .1);
}
#calendar-countdown,
.calendar .calendar-day,
.calendar a .calendar-day {
color: var(--fg);
}
.calendar a.calendar-complete .calendar-mark-complete,
.calendar a.calendar-verycomplete .calendar-mark-complete,
.calendar a.calendar-verycomplete .calendar-mark-verycomplete {
color: var(--fg);
text-shadow: 0 0 5px #ffff66;
}
.stats {
color: var(--fg);
}
.stats-firstonly {
color: #9999cc;
}
.stats-both {
color: var(--fg);
text-shadow: 0 0 5px #ffff66;
}
.stats > a {
text-decoration: none;
color: var(--fg);
}
.stats > a:hover,
.stats > a:focus {
color: var(--fg);
text-decoration: underline;
background-color: rgba(119, 119, 165, .1);
}
.leaderboard-daylinks-selected {
color: var(--fg);
text-shadow: 0 0 5px var(--fg);
}
.leaderboard-daydesc-first {
color: #9999cc;
}
.leaderboard-daydesc-both {
color: var(--fg);
text-shadow: 0 0 5px #ffff66;
}
.leaderboard-entry .leaderboard-totalscore {
color: var(--fg);
}
.quiet {
opacity: 1;
}
}
`;
let styleNode = document.createElement("style");
styleNode.appendChild(document.createTextNode(css));
(document.querySelector("head") || document.documentElement).appendChild(styleNode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment