GMail POP3 Checker for Greasemonkey and Chrome (Automatically!)

GMail POP3 Checker Screenshot

Introduction

I realize this script does not exist anywhere on the internet, and since I wrote this a while back and have been happily using it for quite some time I’ve decided to make it public. It’s quite a simple script. First, it’ll put a “POP3″ link at the very top right corner of your Gmail page. Second, based on what time interval (in minutes) you select (defaults is 8) it’ll automatically run it for you that often. No more of this waiting for Gmail to check it every 60 minutes stuff! If you do not want it to automatically check just set the time interval to None; this way you’ll at least have the link to manually click at any time.

Donate

Did this script change your life? (I like to think so)

Download

Click here to download this fancy script!
Downloading and/or installing this script signifies your acceptance of the Terms of Service. This script is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

If you’re feeling generous and appreciate the work I’ve done, and will continue to do, please consider donating (see above).

Please let me know if you have any other feedback pertaining to this script that may come in handy for future releases.

Installation Directions

Firefox You will first need to install an Add-on called Greasemonkey. Once this is installed and you’ve restarted Firefox come back to this page and click the download link to my script. A new type of popup will appear asking you to install it. Click “Install” and then refresh Gmail and you’re all set. To later remove or disable the script you can right-click on the Greasemonkey logo in your status bar (it looks like a monkey’s head), click “Manage User Scripts,” select “Gmail Select POP3 Now” and then either un-check “Enabled” or click “Uninstall.” Also removing the Add-on Greasemonkey will permanently uninstall it.
Google Chrome You will first need to install an Add-on called Tampermonkey. Once this is installed and come back to this page and click the download link to my script. Simply click my download link in this page. A new type of popup will appear asking you to install it. Click “Install” and then refresh Gmail and you’re all set. To later remove or disable the script you can do so from your Extensions section of Chrome or through Tampermonkey’s settings.
Opera – beta I personally have never done this but someone contributed a comment a while back with directions on how to do this. Basically you will need to download this Greasemonkey Emulator for Opera and then rename my script (aagmfunctions.js) to “00.gmfunctions.user.js” (or something along those lines). Then in the Opera configurations you need to add “opera:config#UserPrefs|UserJavaScriptonHTTPS” and check the main checkbox to enable it.
Internet Explorer (IE) – beta There is a Greasemonkey for IE executable available which I have yet to test. Theoretically if it’s using the same Greasemonkey library as Firefox you should be able to install it for IE and then include my script. Further installation directions are not provided and I cannot guarantee this will work. If you do discover this does (or does not) work please let me know.
Safari – beta There is a Mac only GreaseKit for Safari (and a couple other platforms) which will emulate Greasemonkey User Scripts. I have never tried this, but feel free to attempt it and let me know what you find out. There is another userscript emulator called Ninjakit you could try if that doesn’t work.

FAQs

  • When I view the Settings/Accounts page and click the “POP3″ link it doesn’t tell me it’s checking my mail, why?
    The script runs asynchronously in the background and does not manipulate your view. Thus, you will not see the Settings/Accounts page inform you of the update. However, if you click the “View history” link next to any of your accounts appropriately one minute after clicking the “POP3″ link you’ll see that it truly has updated.
  • Will your script check more than one of my POP3 accounts?
    The script will check every POP3 account you have entered into Gmail.
  • What is the minimum donation to unlock the additional settings?
    The minimum donation is currently set to $1, and the average donation is approximately $4. However, no one likes to be average, right? :)

Change Log

July 21, 2014

  • Firefox 30.0 and Greasemonkey 2.0 require user scripts to request grant permissions for GM_xmlhttpRequest, which was preventing the script from loading. To get the update you will need to install the latest version from the project’s page. This change should not affect Chrome or older versions of Firefox/Greasemonkey. This change has updated the client version to 7/21/2014, as you’ll see from your “Grasemonkey > Manage User Scripts” window in Firefox.

July 7, 2014

  • Fixed a placement bug caused by an update to the Google header.

October 13, 2013

  • Updated the new Gmail location to be visible on all Gmail templates (people with dark templates couldn’t see the countdown).
  • Fixed a performance issue which could cause unresponsive tabs in Chrome if the script ran for very long periods of time.

October 3, 2013

  • Quick update to account for the new Gmail layout without the black-bar. I may move the location of the countdown in a future release, but for now it should be usable again.

April 12, 2013

  • Applied a patch that was causing Chrome version 27.X+ to not load the script correctly. This was due to a recent announcement by Google of replacing WebKit, causing the XHR requests of the script to get wacky. Should be all fixed now, and backwards compatible with older version of Chrome and/or recent builds of Firefox. (Thanks Jonathan, Kyle)

February 15, 2012

  • Sadly Firefox wasn’t playing nice with the new layout, so I’ve rolled it back to the old version where the POP3 script is displayed next to your name/email address in the top right corner. All cosmetic issues should be fixed now, but if not please let me know.

February 12, 2012

  • Fixed a bug I caused from yesterday’s update which prevented Firefox users with the oldish version of Gmail from searching. Sorry! If you are still experiencing issues with this please do let me know.

February 11, 2012

  • Another update by Google reimplementing their black-bar (but of course a completely different set of code) broke the placement of the POP3 script. This bug has been fixed. Gmail now has about 6 different templates, and if your script isn’t working properly please do let me know as it is possible it is broken with the new code.

December 13, 2011

  • After another update by Google the placement broke, preventing the script from fully loading. This bug has been fixed.

December 9, 2011

  • Fixed the misplaced POP3 countdown/text on the new Google header. It should now be located under your name or email.

December 5, 2011

  • Required upgrade. If the upgrade doesn’t work in Firefox with Greasemonkey you may have to uninstall the previous version before installing the new one.
  • Added support for new Google header.

November 13, 2011

  • Fixed a bug where the script would error with missing element “:pn” if the setting for “Refresh” was turned on during start-up in Firefox 8.0.

August 1, 2011

  • Fixed a bug introduced by a new version of Gmail which prevented the client side script from loading in Google Apps or non-Google+ Themed templates. This update is not required, but if you’re experiencing problems with your current client version 2/17/2011 loading you’ll want to upgrade. (Thanks Ertugrul)

July 25, 2011

  • Fixed a cosmetic text-coloring issue caused by the new Google top-banner strip and other dark themes to better contrast the textual countdown.

February 23, 2011

  • Added support to re-check if internet connectivity is lost. You will see the message “Connectivity Lost” and the script with start over at a 3 minute countdown if this happens. This may occur if you put your computer to sleep/hibernate, you enter offline mode, or you actually loose internet or drop wireless. (Thanks Vito E., and Jeff W.)
  • Fixed a small cosmetic issue caused by the new Google top-banner strip.

February 17, 2011

  • Added support for Gmail’s new top banner strip, but also kept backwards compatibility with Google Apps. This is HIGHLY Beta and may cause cosmetic issues. (Thanks Charles E., Bob, Lachelle, Benjamin N., and Chris)
  • Required upgrade from September 25, 2010

November 3, 2010

  • Gmail disabled their original user interface, making the script stop POP3ing. I had to change the method it’s using to request for POP3 updates. (Thanks Benjamin N. and Duncan)

October 14, 2010

  • Optimized the Refresh setting to be more efficient.
  • Fixed an issue where the Refresh setting would “flicker” the compose screen and navigate you to the top of the page. Now refreshes are only done in the background on any of the list pages: Inbox, Sent Mail, All Mail, Trash, etc. (Thanks Nick N. and Adam)

October 12, 2010

  • Added full support for all Labs. Some Labs were preventing the POP3 link/counter from appearing or showing correctly; such as “Google Search.” (Thanks John-Paul C., Dave B., Jason S., and Matt V.)
  • Fixed a broken link in the Terms of Service.

September 30, 2010

  • Changed the mime-type of server requests to text/javascript to prevent warnings in Chrome. (Thanks Dave B.)

September 26, 2010

  • Added popup with help information in the event an upgrade cannot be successfully made (Thanks Paul B.)
  • Fixed a bug in Chrome caused by today’s earlier release due to a new line character in an alert box which Chrome does not support… Sorry! (Thanks David C., Mark H., and Pootle)
  • Added the beta/new/experimental option to Refresh after POP3ing. Please let me know if you run into any issues while using it. (Thanks Daniel M., Dimas, and Halil O. for previously suggesting this feature)

September 25, 2010

  • Added HTTPS support to prevent Chrome from throwing SSL Certificate issues (Thanks all who’ve donated as it helped pay for the server certificates)
  • Corrected rare cosmetic issues with the header links (Thanks Aaron W.)
  • Added Change Log to settings pane
  • Fixed a bug implemented by Gmail’s source code which caused the setting’s pane to overtake the window in Firefox
  • Required upgrade from September 9, 2010

September 9, 2010

  • Added the Settings pane (AWESOME!)
    • Request interval (3-60 minutes)
    • Display “POP3″ in label
    • Display time countdown in label
    • Toggle POP3 on startup
    • Donation link with toggle
    • Reportable errors
  • Now works in Google Apps sites! Hooray!
    • Runs independently from the normal Gmail site and in as many Apps as you have open
  • Displays “POP3 Accounts Missing” if none were found
  • Centralizes the code for easy updating without requesting a new download (for most cases)
  • Moved POP3 link from the far right to next to “settings”
  • Loads instantaneously on slow or fast connections without fail.
  • Makes less requests to Gmail to obtain account information.
  • Sends out a POP3 request quietly and quickly (less than 1 second).
  • Fixed many bugs which were incorrectly gathering the accounts email address needed to POP3 properly.
  • Added script stealing preventions to protect the masses; and my reputation (sorry script kiddies).
  • Tested stable in Firefox 3.6.9 and Chrome 7.0.503.0 dev

April 3, 2010 [download]

  • This is the same exact release as “April 2, 2010 BETA” except I cleaned up the code and removed unnecessary lines of comments. It should now be stable and working properly again.

April 2, 2010 BETA [download]

  • Gmail changed their authentication method with making requests to POP3 accounts. I’ve hacked their code once again to update the script accordingly.
  • I had to remove the option to use iFrames for the requests as the new method can only be done via the POST method. However, it should still function the same.

February 25, 2010 [download]

  • Fixed a very large bug where the number of POP3 accounts you had were miscounted by the script.This should only really affect people with more than 4 accounts, or people with 1. Oh… my silly simple arithmetic skills! (thank you Brad Stinson)

February 24, 2010 [download]

  • Fixed a very large bug where if a POP3 account was ever deleted then any future accounts being added would not be checked. This implies any POP3 account deletion ever occurring, not just after my script was installed. If you’ve had problems with previous versions of this script not POP3ing your accounts, this probably will fix it. (thank you Robert/NRHTX).
  • Fixed a bug where only accounts marked as “Send email as” would be checked. Now all POP3 accounts will be checked, regardless if you’ve set up Gmail to have the ability to send as themselves (thank you Julien Nephtali).
  • Fixed a bug where the “Offline Mode” and “Labs Icon” in the header were not clickable (thank you Jerry Chong and JackieKu).
  • Added support for “googlemail.com” accounts, which typically occur for the German, Chinese, and various other languages.
  • Rolled back the AJAX cross-domain checking to an injected iFrame.
  • Added the variable “useIframe” which will negate the last bullet point, allowing it to use AJAX instead of the iFrames. This should be left to “true” unless you experience issues, then try it as “false.”

February 21, 2010 [download]

  • Fixed a huge bug produced by yesterday’s (2/20/2010) update which only let the counter count down once, check your mail, and then never counted again. Anyone who has the 2/20/2010 update should download the new one immediately (thank you emarell).

February 20, 2010

  • Fixed a bug where if checkEvery was set to 0 the timer would start counting negative if you clicked the “POP3″ link (thank you Robert/NRHTX).
  • Fixed a bug where certain Languages were not supported based on their unique code; such as German (thank you Fred).
  • Changed the method of checking POP3 accounts from an injected iFrame to an AJAX call. Reason being that some people were reporting the update working (which uses AJAX), but not the actual checking of the POP3. This issue seems to have been affecting very few people, but hopefully it’s now fixed (thank you Fred and Reed).

February 19, 2010 (a & b)

 

Sorry! I hate to keep releasing new versions so often, I promise unless something goes drastically wrong this will be the last one for a while.

  • Fixed a bug where if checkForUpdates was set to false (defaults to true) it wouldn’t countdown to a POP3 correctly.
  • Corrected an issue where when updating a previously installed version of this script it wouldn’t do it successfully.
  • Put a sleep buffer on the words “Fetching…” and “Done!” to confirm your POP3 accounts have been checked.
  • Fixed a bug where if you had checkEvery set to 0 it would tell you to set it to a number larger than 3. This shouldn’t have happened since 0 should mean for the script to not automatically check.
  • Added the variable sendAccountForUpdate (defaults to true) which will send me your account name for contact, update, and bug purposes. I will never share or sell your information in any way, but if something critical happens and the auto update fails this will be my last resort of contact. Otherwise never expect an email from me and the script will continue prompting you for an update if one occurs. If you turn this to false you wont hurt my feelings, but just know you’re limiting yourself from a drastic bug update in the future.
  • Fixed a bug where if you had your Gmail settings for the number of conversations on the page changed to anything but three characters (say you selected “25″ instead of “100″) then it would not pull your account settings correctly, thus failing to POP3. (Thanks Chuck for pointing this out!; reason for version ‘b’)

February 18, 2010 (b)

  • After today’s release I noticed some gmail images were being referenced from the wrong base url because of the way the script is pulling in your account data in the function findAccountInfo(). This has been corrected.

February 18, 2010 (THIS IS HUGE)

 

  • Fixed a bug where if checkForUpdates was set to false or checkEvery was set to 0 the script would count up instead of have no count.
  • Added the showCountdown flag which will allow you to turn the countdown off if it annoys you.
  • Corrected a https security issue when checking my server for an update.
  • And Probably the greatest improvement of all time: Everything now runs in the background asynchronously and will not navigate to the settings page. Yay! Appreciate this, because you have no idea how deep I had to dig into gmail’s source code to hack out your google identification number and session key to call the “Check mail now” links directly. :D
  • Because everything runs in the background it’ll never tell you that you’re navigating away from a page when composing or replying to a message (which is just awesomeness all over).
  • Dropped the default checkEvery time to 8 instead of 10 since it will no longer annoy you when composing a message.
  • Added a check to make sure you’re not trying to check faster than every 3 minutes… since I’d LOVE if you didn’t get my script banned by Google.
  • I’ve added a “Donate” button to this page (see above) if you’re feeling generous and appreciate the work I’ve done and will continue to do. Don’t feel pressured though!

February 14, 2010 [download]

 

  • Added a count-down to the POP3 link.
  • Prevented the script from POP3ing if you’re composing a new message.

February 11, 2010

  • Fixed an issue where this wasn’t supported for Google Apps. Thank you Pootle and Ed for catching this!

February 9, 2010

  • The bug where either Firefox 3.6 or Gmail’s Greasemonkey support became unstable, preventing this among other scripts to work, has been fixed. This script no longer uses Gmail’s Greasemonkey support.
  • Updates were made to have more of an aggressive DOM manipulation.
  • The ability for the script to check for updates has been made. It is on by default, but you’re more than welcome to turn it off by setting the checkForUpdates variable to false.

January 15, 2010 [download]

 

  • Script was released in a stable state using Gmail’s Greasemonkey support

879 Responses to “GMail POP3 Checker for Greasemonkey and Chrome (Automatically!)”

  • Thomas Says:

    Hello Daniel.
    Tampermonkey is updated and script doesn’t work any more. Additionally, the gmail icon disappeared. Uninstalled, reinstalled but still nothing…
    Have you any idea?
    Thnx, Thomas

    • Thomas Says:

      Ok, so what I did:
      Uninstalled tampermonkey, restarted chrome, re-installed tampermonkey, restarted chrome, re-installed script, restarted chrome and everything perfectly works!

      • Daniel Slaughter Says:

        Hello Thomas – I’m glad you got it working. Thank you for posting your solution in hopes it helps other people!

      • Jakes van Eeden Says:

        Damn, tried it but still can’t get it working right, it loads most of the time but just sits there and doesn’t respond when I click on it.

  • Scott Says:

    Hey Daniel, It appears this script is no longer working with Firefox, 30.0, Windows. The countdown timer/box has disappeared and emails are no longer retrieving on scheduled basis. Are you experiencing the same issue as well? Thank you kindly :)

    • Daniel Slaughter Says:

      Hello Scott – It looks like for some reason the script uninstalls itself in Firefox 30. You should simply be able to reinstall the script using the link on the project’s page. Afterwards you may need to restart your browser or refresh Gmail.

  • James Says:

    It seems the most recent version of Chrome now forcibly disables any addons not installed from the Chrome Web Store. It directs you to this page if you have a problem with that:
    https://support.google.com/chrome/answer/2811969?p=ui_remove_non_cws_extensions&rd=1

    You can still manually install the script and it will work for until you close Chrome, but next time you open Chrome it will check for and remove any unsigned scripts.

    How much trouble is it to get your wunderscript added to the Chrome Store? It would seem to solve all the problems.

  • Jakes van Eeden Says:

    Looks like my script just stopped working properly. It disappeared from gmail, now it’s back but I can’t get to settings, the time’s on 10 min and I can’t change it even though I had a ‘license’.

    • Daniel Slaughter Says:

      Hello Jakes – From my end it looks like it should be showing up correctly for your Gmail account. Are you by chance using a different Gmail account than the one you were logged into when you donated: s****ac@gmail.com?

  • Neil Says:

    Hi. I have had you script running in the past but have recently got a new computer, installed Greasemonkey as described but can’t now see the count-down.

  • Alex Says:

    Hi there,

    I had donated in order to get my email fetched on 3 minutes but after the update is fetching on 10 minutes. Can you help out ?

    • Daniel Slaughter Says:

      Hello Alex – Thank you for donating! You should be all set, and all you’ll need to do to see the updated settings is restart your browser or refresh Gmail. If you have any other questions please let me know.

  • gearu Says:

    This works in Chrome, but does not work in firefox for me. I don’t see the pop text in the top right hand corner of firefox, I also don’t see any errors in the console. is there something I’ve done wrong? I have followed the install instructions (and as I said it is working correctly in chrome).

    • Daniel Slaughter Says:

      Hello gearu – I believe there may be a recent problem with Firefox 30.0, Greasemonkey 2.0, and this script. I haven’t been able to reproduce it, and it doesn’t seem to be affecting everyone. I hope I can resolve the problem soon.

  • Jack Says:

    Hi Daniel

    Trying it but doesn’t seem to come up. This is what I get in console:
    Use of getAttributeNode() is deprecated. Use getAttribute() instead. rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:113
    Use of attributes’ specified attribute is deprecated. It always returns true. rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:113
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:725
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:28
    CustomError: Error in protected function: a.Ra.o is not a function
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:236
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:27
    no element found jserror:1
    no element found jserror:1
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:123
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:126
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:38
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:1292
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:80
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:1340
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:37
    SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead rs=AItRSTMPwkZhIr9b6fWM1lfYR7Kx-PNUjg:263

  • endriu Says:

    It seems this script is not working with Greasemonkey 2.0 ;/

    I’m opening gmail and settings/sounting for this scrop are not visible :(

  • SC Says:

    HI. Does Gmaiol have to be up and running for the script to work. i.e. if i am using a blackberry to access my emails, will the script continue working when gmail is not open on my computer?

    • Daniel Slaughter Says:

      Hello SC – You’ll need to have Gmail open in your browser with the script running in order for it to POP3 faster. If you were to leave your computer running, however, your Blackberry should pull in POP3ed emails just as quickly as it does regular Gmail emails. Hopefully that answers your question, but if you not please feel free to leave a reply.

  • mus Says:

    Hey Dan,

    I’ve just noticed that the scrip isn’t working in firefox on OSX Mavericks. It works fine on Windows.

    Greasemonkey is running and the script is enabled.

Leave a Reply