File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,13 @@ async function renderSidebarHTML() {
111111 // if sidebar title is empty
112112 if ( sidebarLogo . innerText === '' ) {
113113
114+ sidebarLogo . classList . add ( 'notransition' ) ;
115+
116+ window . setTimeout ( ( ) => {
117+ sidebarLogo . classList . remove ( 'notransition' ) ;
118+ } , 180 ) ;
119+
120+
114121 if ( contents != '' ) {
115122
116123 // if repo is owned by logged user
@@ -125,6 +132,12 @@ async function renderSidebarHTML() {
125132 sidebarLogo . innerText = user + '/' + repoName + contents ;
126133
127134 }
135+
136+
137+ // scroll to end of title
138+ sidebarLogo . scrollTo ( {
139+ left : sidebarLogo . scrollWidth - sidebarLogo . offsetLeft
140+ } ) ;
128141
129142 } else if ( repo != '' ) {
130143
@@ -140,11 +153,21 @@ async function renderSidebarHTML() {
140153 sidebarLogo . innerText = user + '/' + repoName ;
141154
142155 }
156+
157+
158+ // scroll to start of title
159+ sidebarLogo . scrollTo ( 0 , 0 ) ;
160+ scrolledSidebarTitle ( ) ;
143161
144162 } else {
145163
146164 // show title
147165 sidebarLogo . innerText = 'Repositories' ;
166+
167+
168+ // scroll to start of title
169+ sidebarLogo . scrollTo ( 0 , 0 ) ;
170+ scrolledSidebarTitle ( ) ;
148171
149172 }
150173
You can’t perform that action at this time.
0 commit comments