Created
October 4, 2017 03:09
-
-
Save eheikes/2bdcf66c21bf55b03c68bac26bba20f4 to your computer and use it in GitHub Desktop.
Add Gutenberg print CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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