(function() {
  var intervalID = 0

  function createUnreadButton() {
    var unreadDiv, buttonDiv, unreadText
    unreadDiv = document.createElement('div')
    unreadDiv.className = 'G-Ni J-J5-Ji'

    buttonDiv = document.createElement('div')
    buttonDiv.className = 'T-I J-J5-Ji ar7 nf T-I-ax7 L3'
    buttonDiv.setAttribute('role', 'button')

    unreadText = document.createElement('span')
    unreadText.innerHTML = 'Unread'

    buttonDiv.appendChild(unreadText)
    unreadDiv.appendChild(buttonDiv)
    return unreadDiv
  }

  function buttonsOnPage() {
    var buttons = document.getElementsByClassName('Ykrj7b')
    return Boolean(buttons.length)
  }

  function buttonList() {
    var buttons = document.getElementsByClassName('Ykrj7b')
    return buttons[0].parentElement.parentElement.parentElement
  }

  function showUnread() {
    alert("Here are your unread emails")
  }

  function main() {
    var buttonDiv, unreadButton
    if (buttonsOnPage()) {
      buttonDiv    = buttonList()
      unreadButton = createUnreadButton()
      unreadButton.addEventListener('click', showUnread)
      buttonDiv.appendChild(unreadButton)
      clearInterval(intervalID)
    }
  }

  intervalID = setInterval(main, 800)
})()

@@ -846,43 +846,253 @@
     
-alert(%22Here are your unread emails%22
+var filterInput, searchButton%0A    filterInput = document.getElementById('gbqfq')%0A    originalValue = filterInput.value%0A    filterInput.value = %22is:unread %22+originalValue%0A    searchButton = document.getElementById('gbqfb')%0A    searchButton.click(
 )%0A  

Add showUnread function