@@ -19,7 +19,7 @@ async function initUI() {
19
19
const renderLock = Zotero . Promise . defer ( ) ;
20
20
if ( ! isWindowAlive ( addon . data . prefs . window ) ) return ;
21
21
addon . data . prefs . tableHelper = new ztoolkit . VirtualizedTable (
22
- addon . data . prefs . window !
22
+ addon . data . prefs . window ! ,
23
23
)
24
24
. setContainerId ( `${ config . addonRef } -table-container` )
25
25
. setProp ( {
@@ -40,13 +40,13 @@ async function initUI() {
40
40
addon . data . prefs . window ?. document
41
41
. querySelectorAll ( ".action-selection" )
42
42
?. forEach ( ( e ) =>
43
- setButtonDisabled ( e as XUL . Button , selectedKeys . length === 0 )
43
+ setButtonDisabled ( e as XUL . Button , selectedKeys . length === 0 ) ,
44
44
) ;
45
45
46
46
addon . data . prefs . window ?. document
47
47
. querySelectorAll ( ".action-selection-single" )
48
48
?. forEach ( ( e ) =>
49
- setButtonDisabled ( e as XUL . Button , selectedKeys . length !== 1 )
49
+ setButtonDisabled ( e as XUL . Button , selectedKeys . length !== 1 ) ,
50
50
) ;
51
51
} )
52
52
// When pressing delete, delete selected line and refresh table.
@@ -97,7 +97,7 @@ function initEvents() {
97
97
. querySelector ( `#${ config . addonRef } -action-add` )
98
98
?. addEventListener ( "command" , ( e ) => {
99
99
const key = addon . api . actionManager . updateAction (
100
- Object . assign ( { } , emptyAction )
100
+ Object . assign ( { } , emptyAction ) ,
101
101
) ;
102
102
updateUI ( ) ;
103
103
editAndUpdate ( key ) ;
@@ -123,14 +123,14 @@ function initEvents() {
123
123
?. addEventListener ( "command" , async ( e ) => {
124
124
const newAction = Object . assign (
125
125
{ } ,
126
- addon . data . actions . map . get ( addon . data . actions . selectedKey ! )
126
+ addon . data . actions . map . get ( addon . data . actions . selectedKey ! ) ,
127
127
) ;
128
128
if ( newAction . name ) {
129
129
// Add (1) (2) ... to the end of the name
130
130
if ( newAction . name . match ( / \( \d + \) $ / ) ) {
131
131
newAction . name = newAction . name . replace (
132
132
/ \( ( \d + ) \) $ / ,
133
- ( _ , num ) => `(${ parseInt ( num ) + 1 } )`
133
+ ( _ , num ) => `(${ parseInt ( num ) + 1 } )` ,
134
134
) ;
135
135
} else {
136
136
newAction . name += " (1)" ;
@@ -181,7 +181,7 @@ function getRowData(index: number) {
181
181
return {
182
182
event : getString ( `prefs-action-event-${ ActionEventTypes [ action . event ] } ` ) ,
183
183
operation : getString (
184
- `prefs-action-operation-${ ActionOperationTypes [ action . operation ] } `
184
+ `prefs-action-operation-${ ActionOperationTypes [ action . operation ] } ` ,
185
185
) ,
186
186
data : action . data ,
187
187
shortcut : action . shortcut ,
0 commit comments