Skip to content

Commit b124c2e

Browse files
committed
GitHub color theme.
1 parent 2373c23 commit b124c2e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

browser-extension/src/lib/registries.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { OverTypeInstance } from 'overtype'
2+
import OverType from 'overtype'
23
import type { CommentEnhancer, CommentSpot } from './enhancer'
34
import { GitHubIssueAddCommentEnhancer } from './enhancers/github/githubIssueAddComment'
45
import { GitHubPRAddCommentEnhancer } from './enhancers/github/githubPRAddComment'
@@ -19,6 +20,26 @@ export class EnhancerRegistry {
1920
// Register all available handlers
2021
this.register(new GitHubIssueAddCommentEnhancer())
2122
this.register(new GitHubPRAddCommentEnhancer())
23+
const textColor = 'rgb(31, 35, 40)'
24+
OverType.setTheme({
25+
colors: {
26+
blockquote: 'rgb(89, 99, 110)',
27+
code: '#59636e',
28+
codeBg: '#f6f8fa',
29+
cursor: '#f95738',
30+
em: 'rgb(126, 123, 255)',
31+
h1: textColor,
32+
h2: textColor,
33+
h3: textColor,
34+
hr: '#5a7a9b',
35+
link: 'rgb(9, 105, 218)',
36+
selection: 'rgba(244, 211, 94, 0.4)',
37+
strong: 'rgb(45, 1, 142)',
38+
syntaxMarker: textColor,
39+
text: textColor,
40+
},
41+
name: 'custom-github',
42+
})
2243
}
2344

2445
private register<T extends CommentSpot>(enhancer: CommentEnhancer<T>): void {

0 commit comments

Comments
 (0)