comparison app/javascript/src/main.coffee @ 479:b493db1f40b0

Validate format
author nanaya <me@nanaya.pro>
date Sat, 10 Oct 2020 18:16:12 +0900
parents 46ed68bf9918
children
comparison
equal deleted inserted replaced
478:46ed68bf9918 479:b493db1f40b0
76 switchToCurrentHash = -> 76 switchToCurrentHash = ->
77 return if $(".js-showing-paste").length == 0 77 return if $(".js-showing-paste").length == 0
78 78
79 format = window.location.hash.slice(1) 79 format = window.location.hash.slice(1)
80 80
81 return if format.length == 0 81 return unless format in ['pl', 'hl', 'md']
82
82 $(".js-show-tab[data-mode=#{format}]").click() 83 $(".js-show-tab[data-mode=#{format}]").click()
83 84
84 85
85 $ loadLanguageItems 86 $ loadLanguageItems
86 $ switchToCurrentHash 87 $ switchToCurrentHash