Show Notifications in the Tab Title #19
Labels
No labels
dependencies
Priority: Critical
Priority: High
Priority: Low
Priority: Medium
State: Abandoned
State: Blocked
State: Completed
State: In progress
State: New
State: On Hold
State: Pending
State: Review needed
State: Waiting for release
Type: Bug
Type: Enhancement
Type: Maintenance
Type: Question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Serraniel/AniwatchPlus#19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Additionally to displaying the notification counter on the User Navbar Item display the counter on the Tab Title like youtube.
Changing to e.g. the search item and then back to Home loses the Notification Counter in the tab title
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 :odocument.title = 'some text'
is enough to update the title. Changed the code to that propertyGoing to take a look at the PopStateEvent...
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.
This has been published with https://github.com/Serraniel/AniwatchPlus/releases/tag/0.3.0.0-beta.