Permalink
Browse files

Bring show images up to date

  • Loading branch information...
1 parent 5aebc6c commit d7dd1e14071f2adef7d72a6ae45b81752841519e @tim-smart committed Jun 10, 2011
Showing with 26 additions and 0 deletions.
  1. +26 −0 gmail_show_images/script.user.js
@@ -0,0 +1,26 @@
+// ==UserScript==
+// @name GMail Automatically Show Images
+// @namespace http://userscripts.org/users/tim
+// @include https://mail.google.com*
+// @include http://mail.google.com*
+// @require http://updater.usotools.co.cc/51694.js
+// @require http://userscripts.org/scripts/source/56812.user.js
+// ==/UserScript==
+
+var api = new USO.Gmail()
+
+api.on('view:cv', function () {
+ var view = this.active_view
+ , span = view.ownerDocument.evaluate
+ ( ".//span[contains(., 'Always display images from ')]"
+ , view
+ , null
+ , XPathResult.FIRST_ORDERED_NODE_TYPE
+ , null
+ )
+ .singleNodeValue
+
+ if (span) {
+ api.click(span)
+ }
+})

0 comments on commit d7dd1e1

Please sign in to comment.