Skip to content

Commit 2882797

Browse files
committed
Files-filter: Add selected and hover styling. See #46
1 parent eacaae1 commit 2882797

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

github-files-filter.user.js

+16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// @run-at document-idle
1010
// @grant GM_getValue
1111
// @grant GM_setValue
12+
// @grant GM_addStyle
1213
// @require https://greasyfork.org/scripts/28721-mutations/code/mutations.js?version=597950
1314
// @icon https://assets-cdn.github.com/pinned-octocat.svg
1415
// @updateURL https://raw.githubusercontent.com/Mottie/GitHub-userscripts/master/github-files-filter.user.js
@@ -17,6 +18,21 @@
1718
(() => {
1819
"use strict";
1920

21+
// Emphasize selected buttons, disable hover when all selected and remove
22+
// animation delay; See #46
23+
GM_addStyle(`
24+
.gff-filter .btn.selected { font-variant: small-caps; }
25+
.gff-filter .gff-all:not(.selected):hover,
26+
.gff-filter .gff-all:not(.selected) ~ .btn:hover,
27+
.gff-filter .gff-all:not(.selected) ~ .btn.selected:hover {
28+
border-color: #777 !important;
29+
}
30+
.gff-filter .btn:before, .gff-filter .btn:after {
31+
animation-delay: unset !important;
32+
filter: invert(10%);
33+
}
34+
`);
35+
2036
let settings,
2137
list = {};
2238
const types = {

0 commit comments

Comments
 (0)