Skip to content

Instantly share code, notes, and snippets.

@digitalmaster
Created June 2, 2019 17:14
Show Gist options
  • Select an option

  • Save digitalmaster/7c4f29d931b2c6901c793bb8e2b4f571 to your computer and use it in GitHub Desktop.

Select an option

Save digitalmaster/7c4f29d931b2c6901c793bb8e2b4f571 to your computer and use it in GitHub Desktop.
initDisqus: function (config){
disqus_config.params = config;
if (this.loaded) {
DISQUS.reset({
reload: true
});
} else {
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
this.loaded = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment