-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotion-enhancer.js
157 lines (147 loc) · 3.55 KB
/
notion-enhancer.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// ==UserScript==
// @name NotionEnhancer
// @namespace https://github.com/Kur0x/notion-enhancer-tampermonkey
// @version 1.0
// @description NotionEnhancer tampermonkey version.
// @author KuroX
// @match https://www.notion.so/*
// @grant GM_addStyle
// ==/UserScript==
/* License + Copyright Notice
********************************************************************************************
MIT License
Copyright (c) 2020 KuroX
*/
(function() {
'use strict';
GM_addStyle(`
/* custom css here */
/* table_view_hide_new_line */
.notion-table-view-add-row{display:none!important}
/* table_view_hide_new_line */
.notion-peek-renderer>div:nth-child(2){max-width:1205px!important}
/*
* notion-enhancer
* (c) 2020 dragonwocky <[email protected]>
* (c) 2020 TarasokUA
* (https://dragonwocky.me/) under the MIT license
*/
/* titlebar */
.notion-topbar {
height: 55px !important;
}
.window-dragarea {
height: 10px;
width: 100%;
}
.notion-light-theme .window-dragarea {
background: #e6e6e6;
}
.notion-dark-theme .window-dragarea {
background: #272d2f;
}
.window-buttons-area {
display: flex;
align-items: center;
font-size: 14px;
}
@media (max-width: 760px) {
.notion-topbar {
height: 95px !important;
}
.notion-topbar > :nth-child(2) {
display: grid !important;
height: 85px !important;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
}
.window-buttons-area {
grid-row: 1;
grid-column: 9 / span end;
justify-content: flex-end;
}
.notion-topbar-breadcrumb {
grid-row: 2;
grid-column: 1 / span 8;
}
.notion-topbar-actions {
grid-row: 2;
grid-column: 9 / span end;
justify-content: flex-end;
}
}
/* window control buttons */
.window-button {
background: transparent;
border: 0;
margin: 0px 0px 0px 9px;
width: 32px;
line-height: 26px;
border-radius: 4px;
font-size: 16px;
transition-duration: 0.2s;
cursor: default; /* -- not sure? on windows native window buttons have the default cursor,
but other buttons in the titlebar have cursor: pointer */
}
.window-button svg {
margin-top: 8px;
width: 14px;
height: 14px;
}
.window-button svg path {
fill: currentColor;
}
.window-button svg line {
stroke: currentColor;
}
.window-button.btn-close:hover {
background: #e81123 !important;
}
.window-button.btn-close:hover svg line {
stroke: white;
}
/* window control buttons: light theme */
.notion-light-theme .window-button {
font-weight: bold;
}
.notion-light-theme .window-button:hover {
background: rgb(239, 239, 239);
}
/* window control buttons: dark theme */
.notion-dark-theme .window-button:hover {
background: rgb(71, 76, 80);
}
/* scrollbar: pointer */
.notion-scroller {
cursor: auto;
}
/* scrollbar: size */
::-webkit-scrollbar {
width: 8px; /* for vertical */
height: 8px; /* for horizontal */
}
/* scrollbar: light theme */
.notion-light-theme ::-webkit-scrollbar-corner {
background-color: transparent; /* for overlap */
}
.notion-light-theme ::-webkit-scrollbar-thumb {
border-radius: 5px;
background-color: #d9d8d6;
border: 1px solid #cacac8;
}
.notion-light-theme ::-webkit-scrollbar-thumb:hover {
background: #cacac8;
}
/* scrollbar: dark theme */
.notion-dark-theme ::-webkit-scrollbar-corner {
background-color: transparent; /* for overlap */
}
.notion-dark-theme ::-webkit-scrollbar-thumb {
border-radius: 5px;
background-color: #505457;
}
.notion-dark-theme ::-webkit-scrollbar-thumb:hover {
background: #696d6f;
}
/* end notion enhancer */
`)
})();