File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ $(function(){
2222
2323 OCA . Activity . Filter = {
2424 filter : undefined ,
25+ defaultPageTitle : undefined ,
2526 $navigation : $ ( '#app-navigation' ) ,
2627
2728
@@ -38,6 +39,10 @@ $(function(){
3839 return ;
3940 }
4041
42+ if ( ! this . defaultPageTitle ) {
43+ this . defaultPageTitle = window . document . title
44+ }
45+
4146 this . $navigation . find ( 'a[data-navigation=' + this . filter + ']' ) . parent ( ) . removeClass ( 'active' ) . removeAttr ( 'aria-current' ) ;
4247 OCA . Activity . InfinitScrolling . firstKnownId = 0 ;
4348 OCA . Activity . InfinitScrolling . lastGivenId = 0 ;
@@ -51,7 +56,9 @@ $(function(){
5156 $ ( '#loading_activities' ) . removeClass ( 'hidden' ) ;
5257 OCA . Activity . InfinitScrolling . ignoreScroll = 0 ;
5358
54- this . $navigation . find ( 'a[data-navigation=' + filter + ']' ) . parent ( ) . addClass ( 'active' ) . attr ( 'aria-current' , 'page' ) ;
59+ var navigationLink = this . $navigation . find ( 'a[data-navigation=' + filter + ']' ) ;
60+ navigationLink . parent ( ) . addClass ( 'active' ) . attr ( 'aria-current' , 'page' ) ;
61+ window . document . title = navigationLink . text ( ) . trim ( ) + ' - ' + this . defaultPageTitle ;
5562
5663 OCA . Activity . InfinitScrolling . prefill ( ) ;
5764 }
You can’t perform that action at this time.
0 commit comments