Skip to content

Commit

Permalink
fix: remove chrome's pretty print json
Browse files Browse the repository at this point in the history
  • Loading branch information
bukowskiadam committed Sep 15, 2023
1 parent 4d91686 commit 40326ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extension/src/json-viewer/check-if-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ function getPreWithSource() {
var nodeName = childNode.nodeName;
var textContent = childNode.textContent;

// skip chrome's built-in pretty print button
// handle chrome's built-in pretty print button
if (nodeName === "DIV" && childNodes.length > 1) {
childNode = childNodes[1];
nodeName = childNode.nodeName;
textContent = childNode.textContent;
childNode.remove();

return getPreWithSource();
}

if (nodeName === "PRE") {
Expand Down

0 comments on commit 40326ca

Please sign in to comment.