commitdiff.js 530 B

1234567891011121314151617181920
  1. /*
  2. * GitPHP Javascript commitdiff loader
  3. *
  4. * Initializes script modules used on the commitdiff page
  5. *
  6. * @author Christopher Han <xiphux@gmail.com>
  7. * @copyright Copyright (c) 2011 Christopher Han
  8. * @package GitPHP
  9. * @subpackage Javascript
  10. */
  11. define(["jquery", "modules/sidebysidecommitdiff", "common"], function($, sbsDiff) {
  12. $(function(){
  13. var toc = $('div.commitDiffSBS div.SBSTOC');
  14. var content = $('div.SBSContent');
  15. if ((toc.size() > 0) && (content.size() > 0)) {
  16. sbsDiff.init(toc, content);
  17. }
  18. });
  19. });