Hide Gmail All Read

Gmail recently turned on for me the various inbox workflow tabs. I like listing my unread messages first, so the addition is most welcome. But the view by default includes this gargantuan cutesy notification when there are no unread messages in my inbox. Since unread messages are marked in a bold typeface, the extra notification, with its nine miles of whitespace above and below, isn’t necessary. So here’s a quick script to hide it, cribbed mostly from the Legible SVN Diffs in Gmail userscript I mostly cribbed from somebody else. This userscript takes care of the problem by hiding elements with classname “qd.”

[sourcecode language=”javascript”]
// ==UserScript==
// @name Hide Gmail All-Read Notice
// @namespace http://daryl.blog/
// @description Hide the pesky "Woohoo" message in the "Unread first" gmail view.
// @include http://mail.google.com/*
// @include https://mail.google.com/*
// @include http://*.mail.google.com/*
// @include https://*.mail.google.com/*// ==/UserScript==
// ==/UserScript==
(function() {
var css = ".qd { display: none; }";
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
heads[0].appendChild(node);
}
}
})();
[/sourcecode]

Legible svn diffs in Gmail

For my day job, I now have to read many svn commit messages per day, typically via email (though a view via trac is just a click away). Gmail tries to be helpful by adding underline formatting to line additions and strikethrough formatting to removals, but the result is a nasty ball of unreadable spaghetti. I went in search of an extension that would fix this for me and found the Beanstalk SVN Diff Colorizer for Gmail, which is very nearly what I was after. I made one tiny addition of removing the text-decoration properties, and now I have beautifully legible commit emails in my gmail. I went from this:

The old, busted way to read svn diffs in Gmail.

to this:

The new, awesome way to view svn diffs in Gmail.

 

And here’s the script:

[sourcecode language=”javascript”]
// ==UserScript==
// @name SVN Diff Colorizer for GMail (based almost wholly on Beanstalk Diff Colorizer for Gmail – http://userstyles.org/styles/14853)
// @namespace http://userstyles.org
// @description Adds colorization to SVN diffs received via Could be made to work with your webmail of choice, and probably some other SVN hosts, with minimal fuss.
// @author Matt Gillooly
// @include http://mail.google.com/*
// @include https://mail.google.com/*
// @include http://*.mail.google.com/*
// @include https://*.mail.google.com/*
// ==/UserScript==
(function() {
var css = "ins { background-color: #cfc; text-decoration: none; }nn del { background-color: #fcc; text-decoration: none; }";
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
heads[0].appendChild(node);
}
}
})();
[/sourcecode]

The only change I made was to tweak the styles so that only the coloration (and not the line-through or underline text formatting) is displayed.

Tired of Digg Sponsored Ads?

I visit digg.com on a daily basis for links to diverting and sometimes informative content. Recently, the site began displaying sponsored content (that is, ads) right in line with the actual content. Sure, there’s a pale gray disclaimer that these items are sponsored, but it’s subtle enough and my click instinct quick enough that I’ve clicked a number of links that seemed interesting only to find that they went to ads. I finally got tired of it and wrote a Greasemonkey script to hide these suckers If you’re a Greasemonkey user and a Digg user, you might find this user script useful.