Skip to content

Commit 349ea6a

Browse files
committed
chore: remove unused code
1 parent d321e7f commit 349ea6a

2 files changed

Lines changed: 7 additions & 27 deletions

File tree

src/entrypoints/selection.content/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ function HydrateAtoms({
3333
return children
3434
}
3535

36-
// eslint-disable-next-line import/no-mutable-exports
37-
export let shadowWrapper: HTMLElement | null = null
36+
/// eslint-disable-next-line import/no-mutable-exports
37+
// export let shadowWrapper: HTMLElement | null = null
3838

3939
declare global {
4040
interface Window {
@@ -53,7 +53,7 @@ async function mountSelectionUI(ctx: ContentScriptContext) {
5353
anchor: "body",
5454
onMount: (container, shadow, shadowHost) => {
5555
const wrapper = insertShadowRootUIWrapperInto(container)
56-
shadowWrapper = wrapper
56+
// shadowWrapper = wrapper
5757
addStyleToShadow(shadow)
5858
protectSelectAllShadowRoot(shadowHost, wrapper)
5959

@@ -75,7 +75,7 @@ async function mountSelectionUI(ctx: ContentScriptContext) {
7575
},
7676
onRemove: (root) => {
7777
root?.unmount()
78-
shadowWrapper = null
78+
// shadowWrapper = null
7979
},
8080
})
8181

src/utils/config/migration-scripts/v064-to-v065.ts

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,16 @@ export function migrate(oldConfig: any): any {
1313
}
1414

1515
const opacity = selectionToolbar.opacity
16-
const toolbarOpacity = selectionToolbar.toolbarOpacity
17-
const popoverOpacity = selectionToolbar.popoverOpacity
1816

19-
const nextOpacity = typeof opacity === "number"
20-
? opacity
21-
: typeof toolbarOpacity === "number"
22-
? toolbarOpacity
23-
: typeof popoverOpacity === "number"
24-
? popoverOpacity
25-
: 100
26-
27-
if (
28-
nextOpacity === opacity
29-
&& toolbarOpacity === undefined
30-
&& popoverOpacity === undefined
31-
) {
17+
if (typeof opacity === "number") {
3218
return oldConfig
3319
}
3420

35-
const {
36-
toolbarOpacity: _toolbarOpacity,
37-
popoverOpacity: _popoverOpacity,
38-
...restSelectionToolbar
39-
} = selectionToolbar
40-
4121
return {
4222
...oldConfig,
4323
selectionToolbar: {
44-
...restSelectionToolbar,
45-
opacity: nextOpacity,
24+
...selectionToolbar,
25+
opacity: 100,
4626
},
4727
}
4828
}

0 commit comments

Comments
 (0)