From 5467b1b50e74ec4b9ae00ec40b498c1bb3a8ffee Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Tue, 11 Sep 2018 18:41:51 +0100 Subject: [PATCH] Fix js toggle --- lib/web/public/javascripts/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/public/javascripts/application.js b/lib/web/public/javascripts/application.js index 5169d6c..03d64cf 100644 --- a/lib/web/public/javascripts/application.js +++ b/lib/web/public/javascripts/application.js @@ -3,7 +3,7 @@ hljs.initHighlightingOnLoad(); // Make URLs clickable document.querySelectorAll('.http').forEach((element) => { element.onclick = () => { - if (element.innerHTML.indexOf('\n') > -1) { + if (element.innerHTML.indexOf('json') > -1) { const output = element.innerHTML.match(/^(.*)\n/)[1]; element.innerHTML = output; } else {