DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Gmail complaint, fixed  (Read 12,062 times)

ayryq

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 292
Gmail complaint, fixed
« on: June 11, 2019, 05:56 PM »
I have gmail set up to poll my private email address, via POP3. It does this on its own, uncontrollable schedule, based on how often it thinks you might get mail. There is a "refresh" button in the (desktop) webmail interface, which re-polls your POP3 account. There is one quirk, though, which annoys me a lot: the "Refresh" button only appears when no message is selected (I use 2-pane mode; maybe it's different if you don't do this). Once you have a message selected a bunch of new toolbar items appear (delete, spam, move, etc.) and refresh disappears.

Here's the really annoying part. The only way to return to a no-message-selected state is with the keyboard hotkey "U" — there is no on-screen clickable button to do this. And the only way to hit that "refresh" button is with the mouse—there is no hotkey, assignable or not, to invoke that process. So the procedure involves both a right-hand keypress and a mouse action.

I was looking into it and it turns out the refresh button is only hidden with CSS - its div gets a "display:none" when a message is loaded. So here's how you fix it, recorded here both in case someone else finds it handy, and in the event I need to set this up on a new browser.

Option one: "Stylish" is a firefox addon which lets you apply CSS to a page. Create a new rule, applying to URLs starting with "https://mail.google.com", as follows:
Code
div.G-Ni:nth-child(5) {
    display:inline-flex !important
}

Option two: Greasemonkey/Tampermonkey is a firefox/chrome addon which lets you apply javascript to a page. Create a new userscript, as follows:
Code
// ==UserScript==
// @name          Gmail refresh
// @description
// @author
// @homepage
// @include       https://mail.google.com/*
// @version
// ==/UserScript==
(function() {var css = ["div.G-Ni:nth-child(5) {display:inline-flex !important}"].join("\n");

 var node = document.createElement('style');
 node.type = 'text/css';
 node.appendChild(document.createTextNode(css));
 var heads = document.getElementsByTagName('head');
  heads[0].appendChild(node);
})();

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: Gmail complaint, fixed
« Reply #1 on: June 12, 2019, 04:11 PM »
Option one: "Stylish" is a firefox addon which lets you apply CSS to a page.
Have they stopped adding malware to that addon?
- carpe noctem

ayryq

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 292
Re: Gmail complaint, fixed
« Reply #2 on: June 12, 2019, 05:01 PM »
Maybe, not sure. I'm not using it. I was thinking most firefox users would have one or the other of those installed. Apparently "Stylus" does the same thing and is Free. https://addons.mozilla.org/en-US/firefox/addon/styl-us

IainB

  • @Slartibartfarst
  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,544
Re: Gmail complaint, fixed
« Reply #3 on: June 15, 2019, 05:00 AM »
@ayryq: Thanks for that useful tip. :Thmbsup:

Original address: https://www.donationcoder.com/forum/index.php?topic=47896.0