Skip to content

Commit 68fdadd

Browse files
committed
Fix multiple preview button issue on multiple files
Removed the gist.css
1 parent cf34c15 commit 68fdadd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

gist_markdown_preview.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ function appendHtml(e){
3838

3939
preview_area = $('<div class="blob instapaper_body" id="readme"><article class="markdown-body entry-content" itemprop="mainContentOfPage"></article>');
4040
$(".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+
}
4244
}
4345

4446
jQuery(function($){

manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"https://gist.github.com/",
1515
"https://gist.github.com/gists/*/edit"
1616
],
17-
"css": ["css/gist.css"],
1817
"js": [
1918
"js/jquery.min.js",
2019
"gist_markdown_preview.js",

0 commit comments

Comments
 (0)