Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-09-05 00:07:24 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-09-05 00:07:24 +0300
commitcc22a2640f7d9aed743739c583d1fa8f11af2b91 (patch)
tree2a8260e8dbaad41fb5ee8d12939780f16cf60473 /app/assets/javascripts/syntax_highlight.coffee
parent50f76ae0eae29f7362702da274055f76a350ee6f (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.coffee5
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()