-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbookmarklet.js
138 lines (119 loc) · 2.11 KB
/
bookmarklet.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
javascript:(function()
{
var css =
'
/* general rules for the "body" */
#readme .markdown-body,
.file
{
border: none;
}
/* images */
img
{
max-width: 100%;
vertical-align: middle;
}
/* tables */
th, td, .markdown-body table tr
{
padding: 1rem;
vertical-align: top;
}
/* TYPOGRAPHY */
#readme .markdown-body, .file
{
font-family:Roboto;
-webkit-font-smoothing: antialiased;
}
/* headings */
h1, h2, .markdown-body
{
border-bottom:none;
}
.markdown-body blockquote
{
padding: 1rem 1.25rem;
color: inherit;
position: relative;
margin-top: 2rem;
background: #eee;
}
/* hide unneccessary elements */
.header, header,
.pagehead,
.repository-sidebar,
.commit-tease,
.file-wrap,
.boxed-group>h3,
.site-footer, .footer,
.file-navigation,
.file-header,
.overall-summary,
.js-repo-meta-container
{
display:none;
}
/* page breaks */
h1, .new-page
{
page-break-before: always;
}
h1:first-child
{
page-break-before: avoid;
}
pre,
blockquote,
li
{
page-break-inside: avoid;
}
/* Your turn! */
/*blockquote:before
{
content: "Your turn";
position: absolute;
color: #FF8F04;
top: -1.3rem;
left: -.3rem;
font-size: 83%;
font-weight: bold;
}*/
.markdown-body pre,
.markdown-body .highlight pre,
.markdown-body code
{
word-break: break-word;
background-color: #ddd;
border: 1px solid #ccc;
font-family: "Roboto Mono";
font-weight: 700;
}
.markdown-body pre,
.markdown-body .highlight pre
{
padding: 1rem;
overflow: hidden;
overflow-wrap: break-word;
}
.markdown-body code
{
padding: .18em .05em;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5
{
font-family: "Roboto Mono";
margin-top: 4rem;
border-bottom: none;
}
';
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
document.head.appendChild(style);
}())