Skip to content

Instantly share code, notes, and snippets.

@jared-hughes
Created May 1, 2021 21:43
Show Gist options
  • Save jared-hughes/9dd12d9614debfe70dc9e7d399ffd38d to your computer and use it in GitHub Desktop.
Save jared-hughes/9dd12d9614debfe70dc9e7d399ffd38d to your computer and use it in GitHub Desktop.
Set a light gray background on Google Docs
// ==UserScript==
// @name Docs Gray Background
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Set a light gray background on Google Docs
// @author Jared Hughes
// @match https://docs.google.com/document/d/*
// @match https://docs.google.com/presentation/d/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const styleEl = document.createElement('style');
const color = `hsl(0, 0%, 75%)`
styleEl.innerHTML = `
.punch-filmstrip-scroll, .kix-appview-editor, #pages > svg { background: ${color} !important; }
.outline-refresh:not([class*="docs-hc"]) #navigation-widget-top-shadow::after { display: none }
.outline-refresh #navigation-widget-bottom-fade { background: linear-gradient(rgba(255,255,255,0) 0%, ${color} 100%)}
`
document.body.appendChild(styleEl)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment