article: Add missing host to page url for disqus

This commit is contained in:
Jonatan Nilsson 2019-10-02 01:03:40 +00:00
parent f219547436
commit 57b98fd557

View file

@ -86,9 +86,10 @@ const Article = {
this.showcomments this.showcomments
? m('div.commentcontainer', [ ? m('div.commentcontainer', [
m('div#disqus_thread', { oncreate: function() { m('div#disqus_thread', { oncreate: function() {
let fullhost = window.location.protocol + '//' + window.location.host
/*eslint-disable */ /*eslint-disable */
window.disqus_config = function () { window.disqus_config = function () {
this.page.url = '/article/' + vnode.state.article.path this.page.url = fullhost + '/article/' + vnode.state.article.path
this.page.identifier = 'article-' + vnode.state.article.id this.page.identifier = 'article-' + vnode.state.article.id
}; };
(function() { // DON'T EDIT BELOW THIS LINE (function() { // DON'T EDIT BELOW THIS LINE