Skip to content

giltotherescue/github-diff-highlight

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-diff-highlight

Simple dot.js script that enables syntax highlight for commit diffs on github:

Install

You can istall it in one line (assuming you've installed dot.js):

$ curl https://raw.github.com/danielribeiro/github-diff-highlight/master/pkg/github.com.js >> ~/.js/github.com.js

Hacking

The project is based on jquery-syntaxhighlighter, which is itself based on Google's Prettify. If you wanna hack it yourself, read on.

My fork of jquery-syntaxhighlighter is included inline in the project (my fork essentially removes borders on the highlighted pre elements).

The build.sh script composes all relevant jquery-syntaxhighlighter assets, including css, and wraps it around a function block. footer.js actually calls syntaxhighlighter, while header.js just checks that the current page is a commit page.

highlighter_patch.js essentially prevents unneeded remote loading of assets (as they are all included in the final github.com.js).

Meta

Created by Daniel Ribeiro.

Released under the MIT License: http://www.opensource.org/licenses/mit-license.php

https://github.com/danielribeiro/github-diff-highlight

About

Enables Syntax highlight for commit diff on github

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.5%
  • Shell 0.5%