diff --git a/static/js/playground.js b/static/js/playground.js index 6447d1d..405eb89 100644 --- a/static/js/playground.js +++ b/static/js/playground.js @@ -332,6 +332,21 @@ var playground = { } }); }, + disqus: function () { + var url = window.location.href; + if (url.indexOf("?") >= 0) { + if (url.indexOf("disqus=") >= 0) { + url = url.replace("disqus=false", "disqus=true"); + console.log(url); + } else { + url += "&disqus=true"; + } + } else { + url += "?disqus=true"; + } + + window.location.href = url; + }, stop: function () { if (!playground.editor) { return; diff --git a/views/playground/index.html b/views/playground/index.html index 49aa607..0a36da3 100644 --- a/views/playground/index.html +++ b/views/playground/index.html @@ -15,7 +15,7 @@ - {{if .embed}}{{else}}{{end}} + @@ -40,6 +40,9 @@