Show Notifications in the Tab Title #19

Closed
opened 2020-07-29 22:43:23 +02:00 by kaffem · 5 comments
kaffem commented 2020-07-29 22:43:23 +02:00 (Migrated from github.com)

Additionally to displaying the notification counter on the User Navbar Item display the counter on the Tab Title like youtube.

Additionally to displaying the notification counter on the User Navbar Item display the counter on the Tab Title like youtube.
kaffem commented 2020-07-30 22:50:22 +02:00 (Migrated from github.com)

Changing to e.g. the search item and then back to Home loses the Notification Counter in the tab title

Changing to e.g. the search item and then back to Home loses the Notification Counter in the tab title
Serraniel commented 2020-07-31 17:43:52 +02:00 (Migrated from github.com)

You could test the PopStateEvent, I think this will be triggered each time when a new browser history entry is created which always should be the case on URL Change (which itself changes the document title).

Additionally, document.title = 'some text' should be enough to update the title :o

You could test the [PopStateEvent](https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent), I think this will be triggered each time when a new browser history entry is created which always should be the case on URL Change (which itself changes the document title). Additionally, `document.title = 'some text'` should be enough to update the title :o
kaffem commented 2020-08-01 02:38:36 +02:00 (Migrated from github.com)

document.title = 'some text' is enough to update the title. Changed the code to that property
Going to take a look at the PopStateEvent...

`document.title = 'some text'` is enough to update the title. Changed the code to that property Going to take a look at the PopStateEvent...
kaffem commented 2020-08-04 17:44:41 +02:00 (Migrated from github.com)

You could test the PopStateEvent, I think this will be triggered each time when a new browser history entry is created which always should be the case on URL Change (which itself changes the document title).

Sadly the PopStateEvent is only triggered by using the forward and back button of the browser. It does not work with page navigation, listening for pathname changes does this and enables us to display the notificationCount in the Tab Title on page navigation again.

> You could test the [PopStateEvent](https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent), I think this will be triggered each time when a new browser history entry is created which always should be the case on URL Change (which itself changes the document title). Sadly the PopStateEvent is only triggered by using the forward and back button of the browser. It does not work with page navigation, listening for pathname changes does this and enables us to display the notificationCount in the Tab Title on page navigation again.
Serraniel commented 2020-10-28 20:26:04 +01:00 (Migrated from github.com)
This has been published with https://github.com/Serraniel/AniwatchPlus/releases/tag/0.3.0.0-beta.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Serraniel/AniwatchPlus#19
No description provided.