fix codetrunk diff/patch colors in Firefox


At work I often use codetrunk.com to share patches for code review with other developers on my team. I used to use pastebin.com, but ever since it changed ownership a few months ago it has been far less useful. They broke the major pastebin command line tools and the syntax highlighting for diff/patch types is very poor.

The codetrunk site was simple enough that I quickly wrote up my own command line script for uploading content.

Unfortunately though, the codetrunk highlighting for diff/patch files (the primary type that I use there) leaves something to be desired. By default additions are blue and deletions are green, which is hard to read if you are familiar with the green/red highlighting used by git and other programs. Fortunately, this is pretty easy to fix with some CSS in your Firefox userContent.css file in your profile. Just stick the snippet below into that file (not your userChrome.css file) and restart your browser.

@-moz-document domain(codetrunk.com) {
  .syntaxhighlighter .diff.comments, .syntaxhighlighter .diff.comments a {
      color: red !important;
  }
  .syntaxhighlighter .diff.string, .syntaxhighlighter .diff.string a {
      color: green !important;
  }
}