Multi-Column View of Google Search Results

By Ziru Last update Oct 9, 2009 — Installed 13,342 times. Daily Installs: 20, 24, 32, 31, 25, 16, 17, 21, 11, 21, 15, 9, 19, 29, 21, 16, 17, 16, 26, 12, 15, 13, 20, 39, 18, 27, 14, 13, 12, 19, 18

Not work on search results from Google's home page

Subscribe to Not work on search results from Google's home page 24 posts, 6 voices

yugushen User
FirefoxWindows

Hi Ziru,

I find this script does not work on result pages returned by searching right from Google's home page. These pages have addresses like 'http://www.google.com/webhp?...'

Could you check it? Thank you very much!

 
Ziru Script's Author
MozillaWindows

Hi yugushen, The link you pasted here is not complete. Can you please paste a complete one? Btw, the latest script works for me. Thanks,

 
hsrstud User
FirefoxWindows

For some reason it isn't working for me either. Here is an example: http://www.google.com/#hl=en&source=hp&q=dog&aq...

 
Ziru Script's Author
MozillaWindows

@hstrub hmmm, weird. the link you sent works for me. Can you help check the error console (Tools->Error Console) to see whether any errors reported there? Btw, can you provide a little more information such as the version of GreaseMonkey & FF you installed? Thanks,

 
Ziru Script's Author
MozillaWindows

I guess I found the issue, though I could not reproduce it.

For me, the google search URL always looks like http://www.google.*/search?*. In order to prevent the script from running on pages like http://www.google.com/support, I added some URL checking in the script before. Unfortunately, it seems like some users are receiving search results via URLs like http://www.google.com/webhp?* or http://www.google.com/#*.

I updated the script with relaxed URL checking. Hope the new script will work for you guys.

 
hsrstud User
FirefoxWindows

Unfortunately, the script is still not working for me. I'm using the latest versions of both GreaseMonkey (0.8.20090123.1) and Firefox (3.5.2).

 
hsrstud User
FirefoxWindows

I'm not seeing anything in the Error Console related to your script or Google Search.

 
Ziru Script's Author
MozillaWindows

@hsrstud Hmmm, I don't really know what caused this. One last way is to save the source of the google search page and share it somewhere (+ the URL), if you don't mind the trouble.

 
hsrstud User
FirefoxWindows

Download link: http://rapidshare.com/files/271579601/www.googl...

Download link: http://rapidshare.com/files/271579600/dog_-_Goo...

Download link: http://rapidshare.com/files/271579599/google.js

Download link: http://rapidshare.com/files/271579598/search

 
hsrstud User
FirefoxWindows

Hopefully, this should be everything you need.

 
Ziru Script's Author
MozillaWindows

@hsrstud Great. Thanks for sharing the page source. I could now reproduce the issue, and work out the fix. Please try the latest script and let me know if it works this time.

 
yugushen User
FirefoxWindows

@Ziru Thank you for keeping working on it.

While the latest script still doesn't solve the problem, I find several other scripts, which also modify Google's search result page, doesn't work on those URLs too. I further find three warnings related to Google's own script on these pages:

Warning: Selector expected. Ruleset ignored due to bad selector.
Source File: http://www.google.com/ Line: 6

Warning: Selector expected. Ruleset ignored due to bad selector.
Source File: http://www.google.com/ Line: 6

Warning: Unexpected end of file while searching for closing } of invalid rule set.
Source File: http://www.google.com/ Line: 6

So I guess maybe your script is correct, but there's something wrong with Google's script. I'm not familiar with JavaScript, so I cannot figure out what the problem is about Line 6 of Google's script.

One more thing, I only get these URLs on Firefox. For IE and Google Chrome, the search page URL is normal, like "

 
Ziru Script's Author
MozillaWindows

@yugushen Likely. The old script will not work with the page source shared by @hsrstud, but the new one should (well, i used a local web server to serve that page, and it worked; not 100% sure about the real scenario). Google seems to serve different page layouts to users from different locations. It would be helpful if you could share the page source.

 
hsrstud User
FirefoxWindows

Unfortunately, it's still not working for me.

 
Luc Jongen User
FirefoxWindows

Hi Ziru,

Thx for this really nice script.

Right now i'm having the same problem as hsrstud.
It doesn't work fully yet.

There are 2 scenarios:

1. It works perfectly because i do a search from the integrated search bar in firefox.

The search will happen on www.google.be
with the search url always starting with www.google.be/search?

2. In the second scenario your script will not work
because i will type my search straight in my homepage without using the built in search bar from firefox

I set www.google.be (belgium) as my homepage. Although it is the same as in the built in
search bar from firefox, there is one important ! detail:

The search will always start with the url www.google.be/#
as opposed to www.google.be/search?

Your script doesn't work whenever google replaces the traditional url form
/search? with this form /#

Hope this can help you to make this script fully working again.

 
Stephen Cronin Scriptwright
FirefoxWindows

Hi, this problem is caused by Google's new AJAX search results, which are sometimes (and increasingly) used instead of the traditional search. I'm trying to work out how to get around it, but they're doing something really clever / weird. I can set a timeout to check for a DOM object to be present, but it's never present, even though you can see it in the generated source. I'm interested in the solution if someone more clever than me (and Google) can work it out.

 
Stephen Cronin Scriptwright
FirefoxWindows

Actually, I may have come up with a solution. Will test it out with my script (not released yet) and if it works, I'll let you know how it works.

 
hsrstud User
FirefoxWindows

Did you ever get it to work?

 
Ziru Script's Author
FirefoxWindows

Interested in reading the discussion. I am sorry of being little help on this, since I could not reproduce the issue you guys saw. Let us hope Stephen's solution will work.

 
Henrique Abreu User
MozillaX11

@Stephen Did you get it to work? We're waiting :)
@Ziru try entering google in another language: google.de or google.com.br
also try clicking 'Go to Google ZZZ' (sometimes 'Google.com in English') link at googles main page.

 
hsrstud User
FirefoxWindows

I guess this userstyle has similar functionality, just keep the piece that creates the columns.

http://userstyles.org/styles/18639

To be exact:

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("
{
#res.med > div { -moz-column-count: 3 !important; margin: 0 !important; }
#rso { -moz-column-count: 3 !important; margin: 0 !important; }
}

 
Ziru Script's Author
FirefoxWindows

Finally, the script begins to be broken for me as well when searching at google.com. It turns out that Google starts to use AJAX to show search results. I will fix this issue to make the script working again.

 
yugushen User
FirefoxWindows

Thanks, Ziru. The latest script finally solve the problem. Great work. I think this thread can be closed now.

 
Ziru Script's Author
FirefoxWindows

It took so long for me to reproduce the issue. Anyway, it is great to hear it finally got solved.

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