Here is a part of the Disqus's "universal code":
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
What I don't undestand is how Disqus handle this function, because page
is undefined
, so we cannot access to identifier
or url
.
I have tested several examples:
disqus_config();
console.log(disqus_config.page);
var a = new disqus_config();
But I still don't understand how Disqus handle this undefined
element.