]> spindle.queued.net Git - midori/commitdiff
Allow DuckDuckGo to distinguish Midori
authorChristian Dywan <christian@twotoasts.de>
Tue, 21 Feb 2012 20:47:56 +0000 (21:47 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 21 Feb 2012 20:47:56 +0000 (21:47 +0100)
Users who customize the search engine
won't be affected by this.

katze/midori-uri.vala

index e01ba48429d878f663307070eaf5bc301b8ea3ee..6a3c4c82f4382cb6cb603f83b81be9b3b1edb697 100644 (file)
@@ -85,6 +85,9 @@ namespace Midori {
             if (uri == null)
                 return keywords;
             string escaped = GLib.Uri.escape_string (keywords, ":/", true);
+            /* Allow DuckDuckGo to distinguish Midori and in turn share revenue */
+            if (uri == "https://duckduckgo.com/?q=%s")
+                return "https://duckduckgo.com/?q=%s&t=midori".printf (escaped);
             if (uri.str ("%s") != null)
                 return uri.printf (escaped);
             return uri + escaped;