Change page content throught javascript in gmail

101 views Asked by At

I want to attach one label below Inbox in gmail with some name, and on click it should show some content in content area, problem is gmail do not have id of left pane how can i do this using javascript? please seen attached picture

enter image description here

1

There are 1 answers

0
Zbyszek On

You can go down through structure like:

$('div[tabindex=0]:first > div:nth-child(2) > div > div:nth-child(2) > div:first > div:first > div:first > div:nth-child(2) > div > div > div:nth-child(2)')

Or you can use :contains selector like (I have Polish version):

$('h2:contains(Etykiety)').parent()

By the way - isn't messing with gmail with use of some scripting injected into site against their user agreement rules?