[Xfce4-commits] <midori:master> Allow DuckDuckGo to distinguish Midori

Christian Dywan noreply at xfce.org
Tue Feb 21 21:50:01 CET 2012


Updating branch refs/heads/master
         to 5176b3812030c307522c252195494e95d195a32d (commit)
       from ffb86ce7ff23cdf83a4d424fb0d330da6dd9daf5 (commit)

commit 5176b3812030c307522c252195494e95d195a32d
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Feb 21 21:47:56 2012 +0100

    Allow DuckDuckGo to distinguish Midori
    
    Users who customize the search engine
    won't be affected by this.

 katze/midori-uri.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/katze/midori-uri.vala b/katze/midori-uri.vala
index e01ba48..6a3c4c8 100644
--- a/katze/midori-uri.vala
+++ b/katze/midori-uri.vala
@@ -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;


More information about the Xfce4-commits mailing list