summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/syntax_highlight.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/syntax_highlight.coffee')
-rw-r--r--app/assets/javascripts/syntax_highlight.coffee9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/syntax_highlight.coffee b/app/assets/javascripts/syntax_highlight.coffee
new file mode 100644
index 00000000000..510f15d1b49
--- /dev/null
+++ b/app/assets/javascripts/syntax_highlight.coffee
@@ -0,0 +1,9 @@
+# Applies a syntax highlighting color scheme CSS class to any element with the
+# `js-syntax-highlight` class
+#
+# ### Example Markup
+#
+# <div class="js-syntax-highlight"></div>
+#
+$(document).on 'ready page:load', ->
+ $('.js-syntax-highlight').addClass(gon.user_color_scheme)