Skip to content

Instantly share code, notes, and snippets.

@kui
Last active May 30, 2016 00:58
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 kui/e769a01743c3a58d49b0 to your computer and use it in GitHub Desktop.
Save kui/e769a01743c3a58d49b0 to your computer and use it in GitHub Desktop.
Qiita で印刷用スタイルがいまいち気に入らないので適当に変更するユーザスクリプト
// ==UserScript==
// @name Qiita print style
// @description Qiita の印刷用スタイルの適用
// @version 1.0.0
// @match http://qiita.com/*
// @match https://*.qiita.com/*
// ==/UserScript==
var style = [
// 消す要素
'.itemsShowHeader .label-info,',
'.itemsShowHeader .col-sm-3,',
'.taggingEditor,',
'.itemsShowHeaderTags,',
'.itemsShowHeaderStatus,', // 「...が2014/12/26に投稿」も消す時
'.itemsEditorMenu,',
'.likeBox,',
'.globalFooter,',
'.relatedArticles,',
'.commentForm',
' { display: none; }',
'.itemsShowHeader .col-sm-9 { width: 100%; }',
// bootstrap3 の余計なスタイルを上書き
'a[href]:after { content: "" }',
// 右の目次を消す
'.js-itemShowSidebar { display: none; }',
'article > .container .col-sm-9 { width: 100%; }',
// /右の目次を消す
].join('\n');
var s = document.createElement('style');
s.media = 'print';
s.textContent = style;
document.head.appendChild(s);
@kouda-isao
Copy link

こちらのjsを利用させていただきました!
ありがとうございます!!

https://github.com/kouda-isao/qiita_print_formatter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment