diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-09-05 00:07:24 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-09-05 00:07:24 +0300 |
commit | cc22a2640f7d9aed743739c583d1fa8f11af2b91 (patch) | |
tree | 2a8260e8dbaad41fb5ee8d12939780f16cf60473 /app/assets/javascripts/syntax_highlight.coffee | |
parent | 50f76ae0eae29f7362702da274055f76a350ee6f (diff) |
Add syntax highlight scheme to notes rendered client-side
Diffstat (limited to 'app/assets/javascripts/syntax_highlight.coffee')
-rw-r--r-- | app/assets/javascripts/syntax_highlight.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/syntax_highlight.coffee b/app/assets/javascripts/syntax_highlight.coffee index 510f15d1b49..71295cd4b08 100644 --- a/app/assets/javascripts/syntax_highlight.coffee +++ b/app/assets/javascripts/syntax_highlight.coffee @@ -5,5 +5,8 @@ # # <div class="js-syntax-highlight"></div> # +$.fn.syntaxHighlight = -> + $(this).addClass(gon.user_color_scheme) + $(document).on 'ready page:load', -> - $('.js-syntax-highlight').addClass(gon.user_color_scheme) + $('.js-syntax-highlight').syntaxHighlight() |