Skip to content

Commit 572aed3

Browse files
authored
fix mistake with meaning building
1 parent 55bd396 commit 572aed3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

background/background.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ function extractMeaning (document, context) {
3939
if(definitionDivNodeList) {
4040
definitionDivNodeList.forEach((definitionDiv) => {
4141
if (definitionDiv) {
42+
var meaning = ""
4243
definitionDiv.querySelectorAll("span").forEach( function(span) {
4344
if(!span.querySelector("sup")) {
44-
meaningArray.push(span.textContent);
45+
meaning = meaning + span.textContent;
4546
}
4647
});
48+
meaningArray.push(meaning);
4749
}
48-
});
50+
});
4951
}
5052

5153
for(var i = 0; i < meaningArray.length; i++) {
@@ -91,4 +93,4 @@ function saveWord (content) {
9193
definitions
9294
});
9395
})
94-
}
96+
}

0 commit comments

Comments
 (0)