gmail.js
gmail.js copied to clipboard
Add a new button in toolbar(Question)
Hello I am looking for a way to add a new button in toolbar next to More Dropdown.I had a look at the gmail.js and see that api.tools.add_toolbar_button is available to do the same.
Is that the right method to use?Please let me know.
Try it and see if it fits your needs?
If you need to fool around, try compiling the extension in the boilerplate project, and just play around with the gmail-variable available in the developer console.
Also has anyone tested this in new Gmail UI?We are trying to add a button in Gmail UI(old) and making sure the new UI wont break it.
I tried with this:
gmail.tools.add_toolbar_button("zeh click", () => { console.log("ZEH CLICK!"); });
Tested and works for fine for me in both old and new Gmail.
toolbar button seems to disappear when you navigate away from inbox view for me (click a mail, go to sent emails, etc).
That’s a known issue with a known workaround. Please search closed issues for a way to handle this.
@josteink yup, thanks. i just found that after i wrote my comment.
toolbar button seems to disappear when you navigate away from inbox view for me (click a mail, go to sent emails, etc).
I am getting the same problem, I tried the workaround (checking for element then removing it and adding it again) but it didn't work. Another problems I spotted is, if you don't start browsing from inbox (let's say you open your gmail in the sent folder) even if you go to inbox, the button won't render, the element is there, just invisible, any new fixes for it?
I tried with this:
gmail.tools.add_toolbar_button("zeh click", () => { console.log("ZEH CLICK!"); });Tested and works for fine for me in both old and new Gmail.
I doesn't work for me can you explain me how to use this properly
Old issue is old. Closing! :)