Skip to content

Commit

Permalink
Update content.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aedlebeck committed Jan 20, 2022
1 parent 417f009 commit 36def81
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@ function writeData(data, keyword) {
data = JSON.stringify(data);
data = data.substring(1, data.length - 1);
data = data.replaceAll("\"", " ");
if (divs[i].innerHTML.includes(keyword) && JSON.stringify(data) !== '{}') {
if (divs[i].innerHTML.includes(keyword) && data !== '{}' && data) {
divs[i].innerHTML = divs[i].innerHTML.replace(temp, data);
} else {
divs[i].innerHTML = divs[i].innerHTML;
}

}
}
}

0 comments on commit 36def81

Please sign in to comment.