File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const splitPathname = window.location.pathname.split('/');
1414const isArticle = splitPathname [ splitPathname . length - 1 ] === 'articles' ;
1515const labelArticles = { } ;
1616const userLinkDiv = document . getElementById ( 'userLinkContainer' ) ;
17- let hash = splitPathname . pop ( ) ;
17+ let hash = window . location . hash ;
1818let pathname = splitPathname . join ( '/' ) ;
1919let current ;
2020let articles ;
@@ -123,7 +123,7 @@ function updateState() {
123123 const articleTitle = articleDiv . childNodes [ 0 ] . firstChild . innerHTML ;
124124 const feedTitle = articleDiv . childNodes [ 1 ] . firstChild . innerHTML ;
125125 document . title = `${ articleTitle } - ${ feedTitle } (feedreader.co)` ;
126- history . replaceState ( { id : current . id } , '' , `https://${ window . location . hostname } ${ pathname } ${ current . id } ` ) ;
126+ history . replaceState ( { id : current . id } , '' , `https://${ window . location . hostname } ${ pathname } # ${ current . id } ` ) ;
127127 if ( token ) {
128128 console . log ( `Marking ${ id } as read` ) ;
129129 lib . user . labels . post ( 'read' , id ) . then ( ( ) => {
@@ -137,11 +137,6 @@ function updateState() {
137137
138138pathname = `${ pathname } /` ;
139139
140- if ( ( hash . length !== 32 ) && ( hash . length !== 40 ) ) {
141- pathname = `${ pathname } ${ hash } /` ;
142- hash = '' ;
143- }
144-
145140window . onscroll = updateState ;
146141
147142if ( ! user ) {
You can’t perform that action at this time.
0 commit comments