comparison app/assets/javascripts/application.coffee @ 417:080dd141898c

Add support for explicit highlighter languages
author nanaya <me@myconan.net>
date Mon, 14 Sep 2015 14:50:35 +0900
parents c4c8214fb0b2
children f0b4d6bec50e
comparison
equal deleted inserted replaced
416:c4c8214fb0b2 417:080dd141898c
63 $(document).on "ready", -> 63 $(document).on "ready", ->
64 return unless $(".js-showing-paste").length 64 return unless $(".js-showing-paste").length
65 65
66 format = window.location.hash.slice(1) 66 format = window.location.hash.slice(1)
67 $(".js-show-tab-#{format}").click() 67 $(".js-show-tab-#{format}").click()
68
69
70 $(document).on "ready", ->
71 $languageSelectBox = $("#paste_language")
72 return unless $languageSelectBox.length
73
74 for language in hljs.listLanguages().sort()
75 $languageSelectBox.append $("<option />", value: language, text: language)