From 506a381eca5e2bdc31d3529ecd3f1f7797551406 Mon Sep 17 00:00:00 2001
From: Wu Cheng-Han
Date: Tue, 14 Mar 2017 18:04:23 +0800
Subject: Add config option for gitlab api scope and auto adapt gitlab snippet
feature on it
---
public/views/hackmd/header.ejs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'public/views')
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 @@
Gist
<% } %>
- <% if(typeof gitlab !== 'undefined' && gitlab) { %>
+ <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>
Snippet
<% } %>
@@ -54,7 +54,7 @@
Gist
- <% if(typeof gitlab !== 'undefined' && gitlab) { %>
+ <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>
Snippet
<% } %>
@@ -139,7 +139,7 @@
Gist
<% } %>
- <% if(typeof gitlab !== 'undefined' && gitlab) { %>
+ <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>
Snippet
<% } %>
@@ -151,7 +151,7 @@
Gist
- <% if(typeof gitlab !== 'undefined' && gitlab) { %>
+ <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>
Snippet
<% } %>
--
cgit v1.2.3