File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -334,18 +334,16 @@ function createScriptButton(script, isFavorite = false) {
334334 video . muted = true ;
335335 video . loop = true ;
336336 video . style . width = "80vw" ;
337- video . addEventListener ( "loadeddata" , ( ) => {
338- video . pause ( ) ;
339- video . currentTime = 0 ;
340- video . play ( ) ;
337+ // TODO why this not working??
338+ button . addEventListener ( "mouseenter" , ( ) => {
339+ setTimeout ( ( ) => {
340+ video . pause ( ) ;
341+ video . currentTime = 0 ;
342+ video . play ( ) ;
343+ } , 10 ) ;
341344 } ) ;
342- tooltip . addEventListener ( "mouseenter" , ( ) => {
343- video . pause ( ) ;
344- video . currentTime = 0 ;
345- video . play ( ) ;
346- } ) ;
347- tooltip . addEventListener ( "mouseleave" , ( ) => {
348- video . pause ( ) ;
345+ button . addEventListener ( "mouseleave" , ( ) => {
346+ setTimeout ( ( ) => video . pause ( ) , 0 ) ;
349347 } ) ;
350348 tooltip . appendChild ( video ) ;
351349 }
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ chrome.storage.local.get("web_timer", function (result) {
3636
3737 // if (!web_timer || !Object.keys(web_timer).length) {
3838 guide . innerHTML = t ( {
39- vi : "Không có dữ liệu<br/>Vui lòng bật chức năng<br/>Sau đó tải lại các trang web để bắt đầu quá trình đếm. " ,
40- en : "No data<br/>Please enable this script<br/>Then reload all your websites to start the timer. " ,
39+ vi : "Không có dữ liệu" ,
40+ en : "No data" ,
4141 } ) ;
4242 // }
4343
You can’t perform that action at this time.
0 commit comments