File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ function findParent(el, find) {
7
7
}
8
8
9
9
document . addEventListener ( "click" , ( e ) => {
10
- const target = findParent ( e . target , ( el ) => el instanceof HTMLButtonElement && el . dataset [ "copy" ] ) ;
10
+ const target = findParent (
11
+ e . target ,
12
+ ( el ) => el instanceof HTMLButtonElement && el . dataset [ "copy" ] ,
13
+ ) ;
11
14
if ( target ) {
12
15
navigator ?. clipboard ?. writeText ( target . dataset [ "copy" ] ) ;
13
16
}
@@ -16,8 +19,12 @@ document.addEventListener("click", (e) => {
16
19
window . addEventListener ( "load" , ( ) => {
17
20
const checkbox = document . getElementById ( "usageDropdownInput" ) ;
18
21
document . addEventListener ( "mouseup" , ( e ) => {
19
- const label = findParent ( e . target , ( el ) => el instanceof HTMLLabelElement && el . htmlFor === "usageDropdownInput" ) ;
20
- if ( ! label ) {
22
+ const label = findParent (
23
+ e . target ,
24
+ ( el ) =>
25
+ el instanceof HTMLLabelElement && el . htmlFor === "usageDropdownInput" ,
26
+ ) ;
27
+ if ( ! label ) {
21
28
checkbox . checked = false ;
22
29
}
23
30
} ) ;
You can’t perform that action at this time.
0 commit comments