Skip to content

Commit ff6ee88

Browse files
committed
fix the issue google title is too long
1 parent 336ff3f commit ff6ee88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/js/reverseImageSearch.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ export const reverseImageSearch = {
175175
//second <a> contain sourceUrl and thumbUrl
176176
const tagA = singleItem.getElementsByTagName("a");
177177
singleResult.sourceUrl = tagA[0].getAttribute("href");
178-
singleResult.title = tagA[0].innerText;
178+
let title = tagA[0].childNodes;
179+
//console.log(title[0]);
180+
singleResult.title = title[0].innerText;
179181
//new method to dig the image Source
180182
for(let i = 2; i < tagA.length;i++){
181183
if(tagA[i]){

0 commit comments

Comments
 (0)