File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 149149 </ select >
150150 </ div >
151151 < div class ="form-text " style ="font-size: 90%; ">
152- < p style ="padding-top:16px "> The models are listed in order of size. The larger the model, the more accurate it is – and slower to process.</ p >
152+ < p style ="padding-top:16px "> The models are listed in order of size. The larger the model, the more accurate it is – and slower to process.</ p >
153153 < p > The English models are slightly more accurate (for the English language only).</ p >
154154 < p > * Whisper running in the browser is currently in beta.</ p >
155155 </ div >
@@ -1286,12 +1286,22 @@ <h3 class="font-bold text-lg">Load from Local Storage</h3>
12861286 }
12871287
12881288 function addCaption ( elem ) {
1289+ // Initialize the DOM parser and get the template
1290+ let parser = new DOMParser ( ) ;
1291+ let html = document . querySelector ( '#caption-template-holder' ) . innerHTML ;
1292+ let template = parser . parseFromString ( html , "text/html" ) ;
1293+
12891294 let captionTempl = template . querySelector ( '#caption-template' ) . cloneNode ( true ) ;
12901295 captionTempl . getElementsByClassName ( 'line1' ) [ 0 ] . value = "" ;
12911296 captionTempl . getElementsByClassName ( 'line2' ) [ 0 ] . value = "" ;
12921297 captionTempl . getElementsByClassName ( 'start' ) [ 0 ] . value = "00:00:00.000" ;
12931298 captionTempl . getElementsByClassName ( 'end' ) [ 0 ] . value = "00:00:00.000" ;
1299+ captionTempl . classList . add ( 'caption-new' ) ;
12941300 elem . parentElement . parentNode . insertAdjacentElement ( 'afterend' , captionTempl ) ;
1301+ // Remove animation class after animation completes
1302+ setTimeout ( ( ) => {
1303+ captionTempl . classList . remove ( 'caption-new' ) ;
1304+ } , 300 ) ;
12951305 makeCaptionEditorActive ( ) ;
12961306 }
12971307
You can’t perform that action at this time.
0 commit comments