Skip to content

Instantly share code, notes, and snippets.

@eimfach
Created September 10, 2018 16:16
Show Gist options
  • Save eimfach/6434e6cee1ab8e24c23cb7a1caa1fd34 to your computer and use it in GitHub Desktop.
Save eimfach/6434e6cee1ab8e24c23cb7a1caa1fd34 to your computer and use it in GitHub Desktop.
medium.com print bookmarklet
(function(){
var iframes = document.getElementsByTagName('iframe'); for(var i = 0; i < iframes.length; i++) {iframes[i].width = "auto"; }
var content="@media print { img {max-width: 640px !important;} iframe { width: auto; display: block; } .section-inner.sectionLayout--insetColumn { max-width: 1024px !important; padding: padding: 0px 0px !important; } }";
var style = document.createElement('style');
style.appendChild(document.createTextNode(content));
document.getElementsByTagName('head')[0].appendChild(style);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment