diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2020-10-08 09:35:09 +0300 |
---|---|---|
committer | dcouture <dcouture@gitlab.com> | 2020-10-22 17:06:33 +0300 |
commit | f494d1179980f1c116929f7e1c7196a99b4fcc9e (patch) | |
tree | 0fb5e6e52168fff6abd439fe9a2c231abc29ecd8 /layouts/feedback.html | |
parent | c9c969789347f37ded5a9c14bbc794820ca455d1 (diff) |
Add CSP headers
Diffstat (limited to 'layouts/feedback.html')
-rw-r--r-- | layouts/feedback.html | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/layouts/feedback.html b/layouts/feedback.html index 5c69e7eb..235ffdd1 100644 --- a/layouts/feedback.html +++ b/layouts/feedback.html @@ -60,30 +60,7 @@ <div id="disqus_thread" class="disqus-comments-gitlab"></div> - <script> - 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> + <script src="<%= @items['/assets/javascripts/disqus.*'].path %>"></script> <script src="<%= @items['/frontend/feedback/feedback.*'].path %>"></script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript> <% end %> |