Welcome to mirror list, hosted at ThFree Co, Russian Federation.

comments.html « layouts - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 28101679f0792350ee44181200118121575558d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<% if production_and_default_branch? %>
<script type="text/javascript">
var disqus_config = function () {
  this.page.url = '<%= @config[:base_url] %><%= @item.identifier.without_ext + '.html' %>';
  this.page.title = '<%= @item.key?(:title) ? "#{item[:title]} - GitLab Documentation" : "GitLab Documentation" %>';
<% if @item[:disqus_identifier] %>
  this.page.identifier = '<%= @item[:disqus_identifier] %>';
<% else %>
  this.page.identifier = '<%= @config[:base_url] %><%= @item.identifier.without_ext + '.html' %>';
<% end %>
};

var is_disqus_loaded = false;
window.loadDisqus = function() {
  if (!is_disqus_loaded){
    is_disqus_loaded = true;
    var disqusThread = document.getElementById('disqus_thread');
    var d = document, s = d.createElement('script');
    disqusThread.innerHTML = '';
    s.src = 'https://gitlab-docs.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
  }
};
</script>
<% end %>