Ticket #10182: fix_google_search.patch

File fix_google_search.patch, 1.1 KB (added by waddlesplash, 11 years ago)
  • src/apps/webpositive/BrowserWindow.cpp

    From 0f5aa07f146ea9f83cbbf2fcb913cd67886618ad Mon Sep 17 00:00:00 2001
    From: waddlesplash <ajcsweb@gmail.com>
    Date: Thu, 7 Nov 2013 21:36:14 -0500
    Subject: [PATCH] Fix Google Search.
    
    Google now defaults to the Mobile version of the site on browsers it doesn't recognize. Adding "nomo=1" (no mobile) to the query fixes this problem.
    ---
     src/apps/webpositive/BrowserWindow.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp
    index 109056a..40445f4 100644
    a b bool BrowserWindow::_CheckBookmarkExists(BDirectory& directory,  
    22832283    // TODO: Google Code-In Task to make default search
    22842284    //          engine modifiable from Settings? :)
    22852285
    2286     BString engine = "http://www.google.com/search?q=";
     2286    BString engine = "http://www.google.com/search?nomo=1&q=";
    22872287    engine += _EncodeURIComponent(search);
    22882288        // We have to take care of some of the escaping before
    22892289        // we hand over the string to WebKit, if we want queries