File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import {registerGlobalEventFunc} from '../modules/observer.ts';
7
7
const { i18n} = window . config ;
8
8
9
9
export function initCopyContent ( ) {
10
- registerGlobalEventFunc ( 'click' , 'onCopyContentButtonClick' , async ( btn : HTMLInputElement ) => {
10
+ registerGlobalEventFunc ( 'click' , 'onCopyContentButtonClick' , async ( btn : HTMLElement ) => {
11
11
if ( btn . classList . contains ( 'disabled' ) || btn . classList . contains ( 'is-loading' ) ) return ;
12
12
let content ;
13
13
let isRasterImage = false ;
Original file line number Diff line number Diff line change @@ -58,21 +58,23 @@ interface Element {
58
58
type Writable < T > = { - readonly [ K in keyof T ] : T [ K ] } ;
59
59
60
60
interface Window {
61
+ __webpack_public_path__ : string ;
61
62
config : import ( './web_src/js/types.ts' ) . Config ;
62
63
$ : typeof import ( '@types/jquery' ) ,
63
64
jQuery : typeof import ( '@types/jquery' ) ,
64
65
htmx : Omit < typeof import ( 'htmx.org/dist/htmx.esm.js' ) . default , 'config' > & {
65
66
config ?: Writable < typeof import ( 'htmx.org' ) . default . config > ,
66
67
} ,
67
- ui ?: any ,
68
68
_globalHandlerErrors : Array < ErrorEvent & PromiseRejectionEvent > & {
69
69
_inited : boolean ,
70
70
push : ( e : ErrorEvent & PromiseRejectionEvent ) => void | number ,
71
71
} ,
72
- __webpack_public_path__ : string ;
72
+ codeEditors : any [ ] , // export editor for customization
73
+
74
+ // various captcha plugins
73
75
grecaptcha : any ,
74
76
turnstile : any ,
75
77
hcaptcha : any ,
76
- codeEditors : any [ ] ,
77
- updateCloneStates : ( ) => void ,
78
+
79
+ // do not add more properties here unless it is a must
78
80
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ window.addEventListener('load', async () => {
14
14
return 0 ;
15
15
} ) ;
16
16
17
- const ui = SwaggerUI ( {
17
+ SwaggerUI ( {
18
18
spec,
19
19
dom_id : '#swagger-ui' ,
20
20
deepLinking : true ,
@@ -27,6 +27,4 @@ window.addEventListener('load', async () => {
27
27
SwaggerUI . plugins . DownloadUrl ,
28
28
] ,
29
29
} ) ;
30
-
31
- window . ui = ui ;
32
30
} ) ;
You can’t perform that action at this time.
0 commit comments