mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-10-29 23:32:35 +01:00
Fix js toggle
This commit is contained in:
parent
97e47b4797
commit
5467b1b50e
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user