my JSON viewer was not working and I digged into the code. Turns on another extension "zoomWheel" creates 2 elements under document.body.childNodes, so when JSON viewer is executing getPreWithSource(), the following checking will fail and not considering the page as JSON.
var childNodes = document.body.childNodes;
if (childNodes.length === 1) {
Would there be any impact if we loosen the checking as childNodes.length > 0 ?
my JSON viewer was not working and I digged into the code. Turns on another extension "zoomWheel" creates 2 elements under
document.body.childNodes
, so when JSON viewer is executinggetPreWithSource()
, the following checking will fail and not considering the page as JSON.Would there be any impact if we loosen the checking as
childNodes.length > 0
?