Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nyangry committed Feb 12, 2015
1 parent 3fc458b commit 7f00603
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions main.coffee
Expand Up @@ -200,15 +200,16 @@ class InsertLGTMImage
$('.js-lgtm-spinner-image').show()

$current_form = $(@).parents('form')
$text_area = $current_form.find('.js-note-text')

$.getJSON 'http://www.lgtm.in/g', (data) ->

$text_area = $current_form.find('.js-note-text')

# LGTM画像を挿入する
lgtm_image = data.markdown.split('\n\n')[0]
$text_area.val $text_area.val() + ' ' + lgtm_image

# コメント追加ボタンのdisabledを解除する
$current_form.find('.js-comment-button').removeClass('disabled').removeAttr('disabled')

# テキストエリアにフォーカスする
$text_area.focus()

Expand Down
2 changes: 1 addition & 1 deletion main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion manifest.json
@@ -1,5 +1,5 @@
{
"version": "0.3.0",
"version": "0.3.1",
"manifest_version": 2,

"name": "GitLab Helper",
Expand Down

0 comments on commit 7f00603

Please sign in to comment.