Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions extension/js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,12 @@
var jsonLength = (pre && pre.innerText || "").length ;
if (
bodyChildren.length !== 1 ||
pre.tagName !== 'PRE' ||
jsonLength > (3000000) ) {

pre.tagName !== 'PRE' || jsonLength > (3000000)) {
// console.log('Not even text (or longer than 3MB); exiting') ;
// console.log(bodyChildren.length,pre.tagName, pre.innerText.length) ;

if (jsonLength) {
alert('JSON Formatter Error: Cannot format JSON longer than 3MB');
}
// Disconnect the port (without even having used it)
port.disconnect() ;

Expand Down