Gmail – Userscript for Gmail Offline: do not mark as read

gmailuserscripts

Gmail Offline (link 1 link 2 link 3) is a Google Chrome app that works as an offline email client.

It marks emails as read when they are clicked on. This behavior cannot be disabled, but there should be a way to prevent it from setting the "read" flag – maybe with a userscript manager such as Tampermonkey. There is a "MARK_AS_READ" in the JavaScript source of Google Offline, but it is somewhat obfuscated. Any insights where "MARK_AS_READ" leads to?

Best Answer

Update: The Google Chrome app "Gmail Offline" is being replaced by the "Gmail offline" (same name apart from lowercase "o") feature of the new Gmail. The "mark as read" problem can be avoided there, for example by not using split view (preview pane). The original link does not contain information about the Chrome app anymore.

To remove the Chrome app (in order to save disk space occupied by downloaded emails/attachments and stop it from running in the background):

  • Remove cookies for mail.google.com
  • Navigate to chrome://apps
  • Right click on Gmail Offline and select "Remove from Chrome"

An outdated version of these instructions is here (use a translator if you don't speak this language).