const getGmailLocationToInject = () => {
  // where we want to put the search quick links
  // this has be be defined after the page loads and becomes ready
  return document.querySelector('div.wT')
}

const gmailAccountName = () =>
  document
    .querySelector('a[class="gb_y gb_Ea gb_f"]')
    .attributes['aria-label'].nodeValue.match(/\(([^)]+)\)/)[1]

//inside gmail controls container - contains labels such as inbox/starred/drafts/etc
const labelControlsContainer = () =>
  document.getElementsByClassName('ajl aib aZ6')[0]

const widgetMainPanel = () => document.querySelector('div.akc.aZ6')

const widgetInsidePanel = () => document.querySelector('div.T0.pp.saH2Ef')

const gmailSideBar = () => document.querySelector('div.nH.oy8Mbf.nn.aeN')

const gmailHoverSideBar = () =>
  document.querySelector('div.nH.oy8Mbf.nn.aeN.bhZ.bym')

const quickLinksContainer = () =>
  document.querySelector('#gmailQuickLinksContainer')

export {
  gmailSideBar,
  gmailHoverSideBar,
  getGmailLocationToInject,
  gmailAccountName,
  widgetInsidePanel,
  labelControlsContainer,
  quickLinksContainer
}

@@ -228,24 +228,35 @@
 () =%3E%0A  
+Array.from(
 document
 %0A    .qu
@@ -247,21 +247,16 @@
 document
-%0A    
 .querySe
@@ -265,43 +265,45 @@
 ctor
+All
 ('a%5B
-class=%22gb_y gb_Ea gb_f%22
+aria-label
 %5D')
+)
 %0A    
+.map(n =%3E n
 .att
@@ -333,16 +333,58 @@
 odeValue
+)%0A    .find(t =%3E /%5C(.+@.+%5C)/.test(t))%0A    
 .match(/
@@ -390,12 +390,12 @@
 /%5C((
-%5B%5E)%5D
+.+@.
 +)%5C)

add robust gmail account detector instead of using class style due to constant gmail style changes