Google Image Search Advanced

By Chris4 Last update Aug 9, 2009 — Installed 9,259 times.

Suggestions?

in
Subscribe to Suggestions? 22 posts, 6 voices



Chris4 Script's Author

Feel free to submit your suggestions here!

To do:
- Have different text on the drop down menu, compared to what is added in the URL.
- Auto updater
- Make more compact

 
Vaughan Chan... Scriptwright

To get different text you could add the displayable text to the value and separate it with something. For example you could use

'Black and White:Mono'
or
'Black and White|Mono'
... something like that, and then split the value when you're adding the option to the select.

As for a suggestion, it would be nice if you could modify the links to point directly to the images. I know its available in other scripts but I like the idea of a single script that does everything I need for a particular site.

 
Roccobot User

Any chance to add the secondary color search option, like in the search
http://images.google.com/images?imgcolor=blue%2...
?

My example lets you search images for the key 'linux' with blue AND yellow colors.
Also try the search form in this page:
http://blogoscoped.com/archive/2009-03-21-n78.html

Thank you very much for your work.

 
Chris4 Script's Author

The script can now have different text on the drop-down menu compared to the text that goes in the URL. That's that off my to do list!

@Vaughan - I will look into implementing a direct image link into my script. Thanks.

@Roccobot - It would mean creating another drop-down menu box for the secondary color. There's already quite a few and people with low resolution are going to find the drop-down menu's get bunched up onto multiple lines - not very pretty. The obvious way would be with check boxes, but we don't have enough space to do that. Any ideas?

 
Roccobot User

For the dropdown customized text (e.g. different languages) it would be nice to make customizable also the 'Any filetype' label, and any other dropdown entry.

For now, the best solution could be to make shorter text labels, like 'Filter' (On/Off), 'Color 1' (Any, Ble, Red, etc..), and so on.
Another way could be placing the dropdown menus in two rows, I think that this solution would not take away so much space.

 
Vaughan Chan... Scriptwright

Chris, you could look at the user's resolution and then add the extra drop-down box if their resolution is high enough. Keeping everything on one line should be a priority, otherwise it will look too cluttered.

 
Chris4 Script's Author

@Roccobot - Shorter text labels would be good, but at the moment they're matching the other two drop-down menus. Changing them to shorter names won't match the other two, thus looking out of place. Unless it's possible to rename the default 2 drop down menus?

@Vaughan - That's an idea, but I'm still undecided at the moment.

 
Chris4 Script's Author

Update: Shortened all the text labels, including the default ones! :)

 
Aaron Russell Scriptwright

Could add in an extra image size which is the users resolution
screen.width+'x'+screen.height
For use when searching for a good background pic :)

By the way I love this script.

 
Chris4 Script's Author

Great idea Aaron, thanks.

I know how to edit options in an existing drop down menus, but I don't know how to add a new option to an existing drop down menu. Any ideas?

 
Vaughan Chan... Scriptwright

To add a new option to a drop down box you could so something like this:

var opt = document.createElement('option');
opt.innerHTML = 'Option Name';
opt.value = 'optionvalue';
document.getElementById('theDropDownBox').appendChild(opt);

I haven't tested it, but I think that should work (or something along those lines).

 
Aaron Russell Scriptwright

I've no idea

I get stuck when it comes to adding any content to a site.
Just dont understand createelement or appendchild...yet

I just replace things:)

 
Chris4 Script's Author

Thanks for trying Vaughan, but I can't get it to work.
I also tried researching but still was unable to get it working.

 
Vaughan Chan... Scriptwright

The code works for adding an option to a select tag.

The first problem with Google's search page is they don't use IDs for the selects so you'll have to find the select tag using another approach instead of document.getElementById('theDropDownBox'). Using document.evaluate would be one way.

The second (and much bigger) problem is that they don't seem to provide a way of searching for images by exact dimensions, only groupings like 'small' and 'large'. That means that no matter what you do you'll probably never be able to search for an exact image size without automating the process of loading the images and checking the sizes.

 
Chris4 Script's Author

I hope we can find a way around them.

 
Aaron Russell Scriptwright

You do know about
imagesize:
don't you?

I added this to the script to test it

var ssize = document.createElement('input');
ssize.setAttribute('type', 'checkbox');
ssize.setAttribute('name', 'q');
ssize.setAttribute('value', '');
ssize.setAttribute('id', 'ssizebox');
document.getElementById('sft').appendChild(ssize);
var txts = document.createTextNode('Search Screen Size');
document.getElementById('sft').appendChild(txts);
var ssize = 'imagesize:'+screen.width+'x'+screen.height;
void(document.getElementById('ssizebox').value=ssize);

It looks like crap but just demonstrates how it can be done.

This took me like half an hour to do. I think it looks cool
http://aaronymous.x10hosting.com/wallpaper.html

 
Chris4 Script's Author

Oo nice. Thanks for that. It'd be good if it could be added into the Size filter drop down menu.

If you know how to do that, I'll give you full credit for it. :)

 
Aaron Russell Scriptwright

Think i've done it. The only problem is switching between image sizes after you choose one.

Add this to the end.

edit: It blocked some bits for some reason. I put it on pastebay

http://pastebay.com/13526

 
Aaron Russell Scriptwright

void(document.getElementsByName('imagesize')[0].innerHTML='<option>All image sizes</option><option>Extra Large images</option><option>Large images</option><option>Medium images</option><option>Small images</option><option>Screen Size</option>');

Oh wait maybe it does

 
Chris4 Script's Author
Just to clarify, the pastebay code works, but the code in your last post does not.

As you mentioned, there's the problem with switching image sizes, which is a pain.

I very much appreciate you putting time into this though, thanks. :)
 
A G User
OperaWindows

dos it work in opera ?

 
bumino Scriptwright
FirefoxWindows

Thank your for your great work. Could you join this script http://userscripts.org/scripts/show/51505 with yours (it is based on your script anyways) or add the functionality to your script?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel