Created
October 19, 2012 19:35
-
-
Save coolamit/3920224 to your computer and use it in GitHub Desktop.
SVN diff colorizer for Gmail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 | |
// @modifiedBy 2012-10-21 Amit Gupta | |
// @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; display:block; }\n\n del { background-color: #fcc; text-decoration: none; display:block; }\n\n .gs pre { font-size:1.2em; }"; | |
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); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment