geekodour / Author-Google-Extension-

Author Image for Amazon and Flipkart
The Unlicense
5 stars 1 forks source link

Images from Image Search are Not in Order #1

Open geekodour opened 8 years ago

geekodour commented 8 years ago

In the file content.js, around line 100, there is a comment on console.log , uncomment that line to see the problem on web console.

So the URL I am fetching is \ 'https://www.google.co.in/search?&tbm=isch&q='+author** where author is the author from flipkart and amazon books. take for example https://www.google.co.in/search?&tbm=isch&q=robin+sharma .

I am using Regular Expressions to pull out the base64 jpeg encoded images. So, in line 90 of content.js where I am assigning b64ImgArray using the regular expression, the order of images should be according to how it comes in the HTML file that I pulled.

But, the order is not maintained. The orders are jumbled. There are two fixes for this :

geekodour commented 8 years ago

For this problem, accurate image for some lesser known authors is not properly shown. (most of the time the 1st image is the one, but because of the jumbling, you can't decide which one will be the 1st one)

CodeDotJS commented 8 years ago

@geekodour Cloned your repository. Will work on it today :)

geekodour commented 8 years ago

@CodeDotJS thanks!