diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-30 14:43:00 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-30 14:43:00 +0200 |
commit | 96d49bf04ce77c975fe500f4d961e4a1ffed4c26 (patch) | |
tree | 0e43958fb12f17b9dd7a3173ccf1123f4969e74e /doc/code/js/main.js | |
parent | d075df56d3cfb15a5d11550d86229f5b8001fbe7 (diff) | |
download | gitlab-ce-96d49bf04ce77c975fe500f4d961e4a1ffed4c26.tar.gz |
Use sdoc to generate application code documentation
Diffstat (limited to 'doc/code/js/main.js')
-rwxr-xr-x | doc/code/js/main.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/code/js/main.js b/doc/code/js/main.js new file mode 100755 index 00000000000..859772b91d9 --- /dev/null +++ b/doc/code/js/main.js @@ -0,0 +1,24 @@ +function toggleSource(id) +{ + var src = $('#' + id).toggle(); + var isVisible = src.is(':visible'); + $('#l_' + id).html(isVisible ? 'hide' : 'show'); + if (!src.data('syntax-higlighted')) { + src.data('syntax-higlighted', 1); + hljs.highlightBlock(src[0]); + } +} + +window.highlight = function(url) { + var hash = url.match(/#([^#]+)$/) + if(hash) { + $('a[name=' + hash[1] + ']').parent().effect('highlight', {}, 'slow') + } +} + +$(function() { + highlight('#' + location.hash); + $('.description pre').each(function() { + hljs.highlightBlock(this); + }); +}); |