File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ function appendHtml(e){
38
38
39
39
preview_area = $ ( '<div class="blob instapaper_body" id="readme"><article class="markdown-body entry-content" itemprop="mainContentOfPage"></article>' ) ;
40
40
$ ( ".commit-create" ) . parent ( ) . append ( preview_area ) ;
41
- $ ( ".form-actions" ) . append ( "<button type='button' class='btn' id='gist-preview'><span>Preview</span></button>" ) ;
41
+ if ( $ ( '#gist-preview' ) . length === 0 ) {
42
+ $ ( ".form-actions" ) . append ( "<button type='button' class='btn' id='gist-preview'><span>Preview</span></button>" ) ;
43
+ }
42
44
}
43
45
44
46
jQuery ( function ( $ ) {
Original file line number Diff line number Diff line change 14
14
" https://gist.github.com/" ,
15
15
" https://gist.github.com/gists/*/edit"
16
16
],
17
- "css" : [" css/gist.css" ],
18
17
"js" : [
19
18
" js/jquery.min.js" ,
20
19
" gist_markdown_preview.js" ,
You can’t perform that action at this time.
0 commit comments