Skip to content

Commit

Permalink
fix: make radius configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jaulz committed Oct 4, 2020
1 parent c580f14 commit 2882949
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/favicon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type Options = {
backgroundColor: string
color: string
indicator: string
radius: number
}

type Favicon = HTMLLinkElement
Expand All @@ -18,6 +19,7 @@ export const DefaultOptions: Options = {
backgroundColor: '#424242',
color: '#ffffff',
indicator: '!',
radius: 3,
}

// Get all favicons of the page
Expand Down Expand Up @@ -209,7 +211,7 @@ const drawBubble = (
const left = size - width
const bottom = 16 * ratio
const right = 16 * ratio
const radius = 3 * ratio
const radius = options.radius * ratio

// Bubble
context.save()
Expand Down

0 comments on commit 2882949

Please sign in to comment.