ProtonMail / WebClients

Monorepo hosting the proton web clients
GNU General Public License v3.0
4.27k stars 545 forks source link

Userscript for inserting a custom .navigation-link to the .navigation-list #280

Closed shmup closed 1 year ago

shmup commented 2 years ago

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):


This is an off-topic of sorts question, but maybe y'all could have a suggestion for leveraging the existing onClick behavior of .navigation-link nodes.

I generally go to All Mail and then Unread, which is fine it's just 2-clicks. But in typical over-engineering behavior I've added an Unread Mail entry to it, which points to /u/0/all-mail#filter=unread, via a userscript.

Well, this is ugly because it does an actual page load, unless I'm already on All Mail.

But, maybe I can do a thing to have the React app navigate to /u/0/all-mail#filter=unread as an existing .navigation-link would.

Curious if y'all have any approaches I could consider.

Here's the script for context if interested: http://ix.io/44R3/js and a screenshot for posterity: image