From f3ee4e500b67897b6bd7cdffb4abb919d56521d0 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Wed, 25 Oct 2017 10:58:52 +0100 Subject: [PATCH] Bug 1411518 - Update follow-on search add-on to 0.9.6. r=past --HG-- extra : rebase_source : e157aea8c2f35dc2b41c3afd3292e42cd0110775 --- .../content/followonsearch-fs.js | 31 +++++++++---------- browser/extensions/followonsearch/install.rdf | 2 +- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/browser/extensions/followonsearch/content/followonsearch-fs.js b/browser/extensions/followonsearch/content/followonsearch-fs.js index e9925b7cf33c..029f6333e715 100644 --- a/browser/extensions/followonsearch/content/followonsearch-fs.js +++ b/browser/extensions/followonsearch/content/followonsearch-fs.js @@ -22,13 +22,13 @@ let searchDomains = [{ "domains": [ "search.yahoo.co.jp" ], "search": "p", "followOnSearch": "ai", - "prefix": "fr", + "prefix": ["fr"], "codes": ["mozff"], "sap": "yahoo", }, { "domains": [ "www.bing.com" ], "search": "q", - "prefix": "pc", + "prefix": ["pc"], "reportPrefix": "form", "codes": ["MOZI", "MOZD", "MZSL01", "MZSL02", "MZSL03", "MOZ2"], "sap": "bing", @@ -36,17 +36,7 @@ let searchDomains = [{ // The Yahoo domains to watch for. "domains": [ "search.yahoo.com", "ca.search.yahoo.com", "hk.search.yahoo.com", - "tw.search.yahoo.com", "mozilla.search.yahoo.com", "us.search.yahoo.com" - ], - "search": "p", - "followOnSearch": "fr2", - "prefix": "hspart", - "reportPrefix": "hsimp", - "codes": ["mozilla"], - "sap": "yahoo", -}, { - // The Yahoo legacy domains. - "domains": [ + "tw.search.yahoo.com", "mozilla.search.yahoo.com", "us.search.yahoo.com", "no.search.yahoo.com", "ar.search.yahoo.com", "br.search.yahoo.com", "ch.search.yahoo.com", "cl.search.yahoo.com", "de.search.yahoo.com", "uk.search.yahoo.com", "es.search.yahoo.com", "espanol.search.yahoo.com", @@ -56,8 +46,9 @@ let searchDomains = [{ ], "search": "p", "followOnSearch": "fr2", - "prefix": "fr", - "codes": ["moz35"], + "prefix": ["hspart", "fr"], + "reportPrefix": "hsimp", + "codes": ["mozilla", "moz35"], "sap": "yahoo", }, { // The Google domains. @@ -116,7 +107,7 @@ let searchDomains = [{ "www.google.co.zm", "www.google.co.zw", ], "search": "q", - "prefix": "client", + "prefix": ["client"], "followOnSearch": "oq", "codes": ["firefox-b-ab", "firefox-b"], "sap": "google", @@ -188,7 +179,13 @@ var webProgressListener = { } let queries = new URLSearchParams(aLocation.query); - let code = queries.get(domainInfo.prefix); + // Yahoo has switched to Unified search so we can get + // different codes on the same domain. Hack for now + // to allow two different prefixes for codes + let code = queries.get(domainInfo.prefix[0]); + if (!code && domainInfo.prefix.length > 1) { + code = queries.get(domainInfo.prefix[1]); + } // Special case Google so we can track searches // without codes from the browser. if (domainInfo.sap == "google") { diff --git a/browser/extensions/followonsearch/install.rdf b/browser/extensions/followonsearch/install.rdf index e81957f8e64a..d0792631b5ba 100644 --- a/browser/extensions/followonsearch/install.rdf +++ b/browser/extensions/followonsearch/install.rdf @@ -7,7 +7,7 @@ followonsearch@mozilla.com Follow-on Search Telemetry - 0.9.5 + 0.9.6 2 true true