Skip to content

Commit 2f33494

Browse files
committed
Fix clicking on the Following tab not working when you have a notification count in the title
1 parent 4c986a0 commit 2f33494

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7316,7 +7316,7 @@ async function tweakTimelineTabs($timelineTabs) {
73167316

73177317
// Return to the Home timeline when any other tab is clicked
73187318
$followingTabLink.parentElement.parentElement.addEventListener('click', () => {
7319-
if (location.pathname == '/home' && !document.title.startsWith(getString('HOME'))) {
7319+
if (location.pathname == '/home' && currentPage != getString('HOME')) {
73207320
log('setting title to Home')
73217321
homeNavigationIsBeingUsed = true
73227322
setTitle(getString('HOME'))
@@ -7331,7 +7331,7 @@ async function tweakTimelineTabs($timelineTabs) {
73317331
if ($homeNavLink && !$homeNavLink.dataset.cpftListener) {
73327332
$homeNavLink.addEventListener('click', () => {
73337333
homeNavigationIsBeingUsed = true
7334-
if (location.pathname == '/home' && !document.title.startsWith(getString('HOME'))) {
7334+
if (location.pathname == '/home' && currentPage != getString('HOME')) {
73357335
setTitle(getString('HOME'))
73367336
}
73377337
})
@@ -7342,7 +7342,7 @@ async function tweakTimelineTabs($timelineTabs) {
73427342
// separated Tweets timeline to switch back to Following without opening
73437343
// the menu.
73447344
$followingTabLink.parentElement.addEventListener('click', (e) => {
7345-
if (!document.title.startsWith(getString('HOME')) && $homeNavLink) {
7345+
if (currentPage != getString('HOME') && $homeNavLink) {
73467346
e.preventDefault()
73477347
e.stopPropagation()
73487348
log('clicking the Home nav link to return to Following')

0 commit comments

Comments
 (0)