@@ -120,9 +120,9 @@ async function renderSidebarHTML() {
120120
121121 sidebarLogo . classList . add ( 'notransition' ) ;
122122
123- window . setTimeout ( ( ) => {
123+ onNextFrame ( ( ) => {
124124 sidebarLogo . classList . remove ( 'notransition' ) ;
125- } , 180 ) ;
125+ } ) ;
126126
127127
128128 if ( contents != '' ) {
@@ -390,8 +390,6 @@ async function renderSidebarHTML() {
390390
391391 // show title
392392
393- let titleAnimation ;
394-
395393 if ( contents != '' ) {
396394
397395 // if repo is owned by logged user
@@ -410,10 +408,18 @@ async function renderSidebarHTML() {
410408
411409 // scroll to end of title
412410 sidebarLogo . scrollTo ( {
413- left : sidebarLogo . scrollWidth - sidebarLogo . offsetLeft ,
414- behavior : 'smooth'
411+ left : sidebarLogo . scrollWidth - sidebarLogo . offsetLeft // ,
412+ // behavior: 'smooth'
415413 } ) ;
416414
415+ sidebarLogo . classList . add ( 'notransition' ) ;
416+
417+ onNextFrame ( ( ) => {
418+ sidebarLogo . classList . remove ( 'notransition' ) ;
419+ } ) ;
420+
421+ scrolledSidebarTitle ( ) ;
422+
417423 } else if ( repo != '' ) {
418424
419425 // if repo is owned by logged user
@@ -433,9 +439,9 @@ async function renderSidebarHTML() {
433439 sidebarLogo . scrollTo ( 0 , 0 ) ;
434440 sidebarLogo . classList . add ( 'notransition' ) ;
435441
436- window . setTimeout ( ( ) => {
442+ onNextFrame ( ( ) => {
437443 sidebarLogo . classList . remove ( 'notransition' ) ;
438- } , 180 ) ;
444+ } ) ;
439445
440446 scrolledSidebarTitle ( ) ;
441447
@@ -451,9 +457,9 @@ async function renderSidebarHTML() {
451457 sidebarLogo . scrollTo ( 0 , 0 ) ;
452458 sidebarLogo . classList . add ( 'notransition' ) ;
453459
454- window . setTimeout ( ( ) => {
460+ onNextFrame ( ( ) => {
455461 sidebarLogo . classList . remove ( 'notransition' ) ;
456- } , 180 ) ;
462+ } ) ;
457463
458464 scrolledSidebarTitle ( ) ;
459465
0 commit comments