File tree Expand file tree Collapse file tree
entrypoints/selection.content
utils/config/migration-scripts Expand file tree Collapse file tree Original file line number Diff line number Diff 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
3939declare 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
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments