Last active
May 30, 2016 00:58
-
-
Save kui/e769a01743c3a58d49b0 to your computer and use it in GitHub Desktop.
Qiita で印刷用スタイルがいまいち気に入らないので適当に変更するユーザスクリプト
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 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
こちらのjsを利用させていただきました!
ありがとうございます!!
https://github.com/kouda-isao/qiita_print_formatter