diff --git a/includes/specs/comment.spec.js b/includes/specs/comment.spec.js
index 9d12260..78784af 100644
--- a/includes/specs/comment.spec.js
+++ b/includes/specs/comment.spec.js
@@ -58,6 +58,12 @@ const GitmentGitalkSpec = {
[type]: 'string',
[required]: true
}
+ },
+ distraction_free_mode: {
+ [type]: 'boolean',
+ [doc]: 'Facebook-like distraction free mode',
+ [defaultValue]: false,
+ [requires]: comment => comment.type === 'gitalk'
}
};
diff --git a/layout/comment/gitalk.ejs b/layout/comment/gitalk.ejs
index e49aae9..1817e40 100644
--- a/layout/comment/gitalk.ejs
+++ b/layout/comment/gitalk.ejs
@@ -15,7 +15,8 @@
id: '<%= md5(page.path) %>',
repo: '<%= get_config('comment.repo') %>',
owner: '<%= get_config('comment.owner') %>',
- admin: <%- JSON.stringify(get_config('comment.admin'))%>
+ admin: <%- JSON.stringify(get_config('comment.admin'))%>,
+ distractionFreeMode: <%= get_config('comment.distraction_free_mode', false) %>
})
gitalk.render('comment-container')
diff --git a/layout/comment/gitment.ejs b/layout/comment/gitment.ejs
index e5e3047..1280512 100644
--- a/layout/comment/gitment.ejs
+++ b/layout/comment/gitment.ejs
@@ -10,7 +10,7 @@