Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #15 from danielribeiro/new-new-github-diff
Browse files Browse the repository at this point in the history
fixes #14
  • Loading branch information
danielribeiro committed Apr 11, 2013
2 parents 3b8b789 + c5f99c3 commit ed886d1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions build.sh
Expand Up @@ -16,3 +16,5 @@ cat ../src/header.js \
../src/highlighter_patch.js \
../src/footer.js \
>> $outfile

echo Built pkg/github.com.js
10 changes: 5 additions & 5 deletions pkg/github.com.js
Expand Up @@ -2160,15 +2160,15 @@ window['_pr_isIE6'] = function () {
// Chain
return this;
}
})(jQuery); $(".diff-line").each(function() {
})(jQuery); $(".diff-line-code").each(function() {
var t = $(this);
var text = $.trim(t.text());
t.contents().filter(function() { return this.nodeType == Node.TEXT_NODE; }).remove()
t.append("<pre></pre>");
t.find("pre").text(text);
})
$(".diff-line pre").addClass("highlight");
$("td.gd.diff-line pre").css({backgroundColor: "#FDD"});
$("td.gi.diff-line pre").css({backgroundColor: "#DFD"});
setTimeout(function(){ $.SyntaxHighlighter.init({lineNumbers: false}); }, 900);
$(".diff-line-code pre").addClass("highlight");
$(".file-diff-line.gd .diff-line-code pre").css({backgroundColor: "#FDD"});
$(".file-diff-line.gi .diff-line-code pre").css({backgroundColor: "#DFD"});
setTimeout(function(){ $.SyntaxHighlighter.init({lineNumbers: false}); }, 200);
});
10 changes: 5 additions & 5 deletions src/footer.js
@@ -1,12 +1,12 @@
$(".diff-line").each(function() {
$(".diff-line-code").each(function() {
var t = $(this);
var text = $.trim(t.text());
t.contents().filter(function() { return this.nodeType == Node.TEXT_NODE; }).remove()
t.append("<pre></pre>");
t.find("pre").text(text);
})
$(".diff-line pre").addClass("highlight");
$("td.gd.diff-line pre").css({backgroundColor: "#FDD"});
$("td.gi.diff-line pre").css({backgroundColor: "#DFD"});
setTimeout(function(){ $.SyntaxHighlighter.init({lineNumbers: false}); }, 900);
$(".diff-line-code pre").addClass("highlight");
$(".file-diff-line.gd .diff-line-code pre").css({backgroundColor: "#FDD"});
$(".file-diff-line.gi .diff-line-code pre").css({backgroundColor: "#DFD"});
setTimeout(function(){ $.SyntaxHighlighter.init({lineNumbers: false}); }, 200);
});

0 comments on commit ed886d1

Please sign in to comment.