When you press the Favorites button, the Url will be added to the Favorites list
And the problem is how can I when I press again it is removed from the list and when the title is there, the button remains red
Upon pressing favourite button, as you did just check.
If the current url is not in the tinydb list, Then Add items to the list and save the list in tinydb+ change the button colour to red Else remove the item from the list using index method + change the button colour
Thank you for this, but there is a problem, which is when you visit an URL that is saved in your favourites, the button must automatically turn red to recognize that it is saved in your favourites.