Skip to content

Commit 430b9f9

Browse files
committed
Update filebrowser.js
1 parent 8ea35b5 commit 430b9f9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

filebrowser.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -414,6 +412,14 @@ async function renderSidebarHTML() {
414412
//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

Comments
 (0)