summaryrefslogtreecommitdiff
path: root/public/views
diff options
context:
space:
mode:
Diffstat (limited to 'public/views')
-rw-r--r--public/views/hackmd/header.ejs8
1 files changed, 4 insertions, 4 deletions
diff --git a/public/views/hackmd/header.ejs b/public/views/hackmd/header.ejs
index bb4e3174..24282b07 100644
--- a/public/views/hackmd/header.ejs
+++ b/public/views/hackmd/header.ejs
@@ -42,7 +42,7 @@
<li role="presentation"><a role="menuitem" class="ui-save-gist" tabindex="-1" href="#" target="_blank"><i class="fa fa-github fa-fw"></i> Gist</a>
</li>
<% } %>
- <% if(typeof gitlab !== 'undefined' && gitlab) { %>
+ <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>
<li role="presentation"><a role="menuitem" class="ui-save-snippet" href="#"><i class="fa fa-gitlab fa-fw"></i> Snippet</a>
</li>
<% } %>
@@ -54,7 +54,7 @@
</li>
<li role="presentation"><a role="menuitem" class="ui-import-gist" href="#" data-toggle="modal" data-target="#gistImportModal"><i class="fa fa-github fa-fw"></i> Gist</a>
</li>
- <% if(typeof gitlab !== 'undefined' && gitlab) { %>
+ <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>
<li role="presentation"><a role="menuitem" class="ui-import-snippet" href="#"><i class="fa fa-gitlab fa-fw"></i> Snippet</a>
</li>
<% } %>
@@ -139,7 +139,7 @@
<li role="presentation"><a role="menuitem" class="ui-save-gist" tabindex="-1" href="#" target="_blank"><i class="fa fa-github fa-fw"></i> Gist</a>
</li>
<% } %>
- <% if(typeof gitlab !== 'undefined' && gitlab) { %>
+ <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>
<li role="presentation"><a role="menuitem" class="ui-save-snippet" href="#"><i class="fa fa-gitlab fa-fw"></i> Snippet</a>
</li>
<% } %>
@@ -151,7 +151,7 @@
</li>
<li role="presentation"><a role="menuitem" class="ui-import-gist" href="#" data-toggle="modal" data-target="#gistImportModal"><i class="fa fa-github fa-fw"></i> Gist</a>
</li>
- <% if(typeof gitlab !== 'undefined' && gitlab) { %>
+ <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>
<li role="presentation"><a role="menuitem" class="ui-import-snippet" href="#"><i class="fa fa-gitlab fa-fw"></i> Snippet</a>
</li>
<% } %>