From 5e2c1788311095ef5f09c0062201f44d4e46771e Mon Sep 17 00:00:00 2001 From: dropfen Date: Wed, 9 Sep 2015 02:14:36 +0200 Subject: [PATCH 1/2] Use DISQUS_SHORTNAME variable --- disqus_loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disqus_loader.js b/disqus_loader.js index a15bf17..1c6e0b4 100644 --- a/disqus_loader.js +++ b/disqus_loader.js @@ -1,5 +1,5 @@ DISQUS_LOADER = function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = '//' + Meteor.settings.public.disqus.shortname + '.disqus.com/embed.js'; + dsq.src = '//' + DISQUS_SHORTNAME || Meteor.settings.public.disqus.shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); }; From 4ee825446889a72b1c4288d92ceb6d8a16e83f62 Mon Sep 17 00:00:00 2001 From: dropfen Date: Wed, 9 Sep 2015 02:17:42 +0200 Subject: [PATCH 2/2] wrap expression --- disqus_loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disqus_loader.js b/disqus_loader.js index 1c6e0b4..bc24e52 100644 --- a/disqus_loader.js +++ b/disqus_loader.js @@ -1,5 +1,5 @@ DISQUS_LOADER = function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = '//' + DISQUS_SHORTNAME || Meteor.settings.public.disqus.shortname + '.disqus.com/embed.js'; + dsq.src = '//' + (DISQUS_SHORTNAME || Meteor.settings.public.disqus.shortname) + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); };