Skip to content

Instantly share code, notes, and snippets.

@eheikes
Created October 4, 2017 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eheikes/2bdcf66c21bf55b03c68bac26bba20f4 to your computer and use it in GitHub Desktop.
Save eheikes/2bdcf66c21bf55b03c68bac26bba20f4 to your computer and use it in GitHub Desktop.
Add Gutenberg print CSS
// ==UserScript==
// @name Gutenberg
// @namespace https://github.com/BafS/Gutenberg
// @version 1.0
// @description Adds print CSS
// @author Eric Heikes
// @include *
// @exclude http*://localhost
// @grant none
// ==/UserScript==
(function() {
'use strict';
let head = document.head || document.getElementsByTagName('head')[0];
if (!head) { return; }
let link = document.createElement('link');
link.setAttribute('href', 'https://unpkg.com/gutenberg-css@0.4');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('media', 'print');
head.appendChild(link);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment