Commit 508c0926 authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Bug 17351: Remove "fix_google_srch" code/entities (unused).

Removed torbutton_wrap_search_service() function,
  torbutton.prefs.fix_google_srch entities, and
  extensions.torbutton.fix_google_srch default pref.
parent f98243cf
......@@ -2901,53 +2901,6 @@ function torbutton_fixup_old_prefs()
// ---------------------- Event handlers -----------------
// Bug 1506 P1/P3: This removes any platform-specific junk
// from the omnibox. In Tor Browser, it should not be needed.
function torbutton_wrap_search_service()
{
var ss = Cc["@mozilla.org/browser/search-service;1"]
.getService(Ci.nsIBrowserSearchService);
var junk = {"value":0};
var engines = ss.getEngines(junk);
for(var i = 0; i < engines.length; ++i) {
var origEngineObj = engines[i].wrappedJSObject;
torbutton_log(2, "Got engine: "+origEngineObj._name);
// hrmm.. could use
// searchForm.match(/^www\.google\.(co\.\S\S|com|\S\S|com\.\S\S)$/);
if(origEngineObj._name.indexOf("Google") != -1) {
torbutton_log(3, "Found google search plugin to wrap.");
if (typeof(origEngineObj.oldGetSubmission) == "undefined") {
torbutton_log(3, "Original window for google search");
origEngineObj.oldGetSubmission=origEngineObj.getSubmission;
} else {
torbutton_log(3, "Secondary window for google search");
}
origEngineObj.getSubmission = function lmbd(aData, respType) {
var sub = this.oldGetSubmission(aData, respType);
if(!m_tb_prefs.getBoolPref("extensions.torbutton.tor_enabled")
|| !m_tb_prefs.getBoolPref("extensions.torbutton.fix_google_srch")) {
return sub;
}
var querymatch = sub.uri.path.match("[\?\&](q=[^&]+)(?:[\&]|$)")[1];
var querypath = sub.uri.path.split("?")[0];
torbutton_log(3, "Got submission call to Google search.");
var newURI = Cc["@mozilla.org/network/standard-url;1"]
.createInstance(Ci.nsIStandardURL);
newURI.init(Ci.nsIStandardURL.URLTYPE_STANDARD, 80,
sub.uri.scheme+"://"+sub.uri.host+querypath+"?"+querymatch,
sub.uri.originCharset, null);
newURI = newURI.QueryInterface(Components.interfaces.nsIURI);
sub._uri = newURI;
torbutton_log(3, "Returning new search url.");
return sub;
};
}
}
}
// Bug 1506 P1-P3: Most of these observers aren't very important.
// See their comments for details
function torbutton_do_main_window_startup()
......@@ -2963,9 +2916,6 @@ function torbutton_do_main_window_startup()
progress.addProgressListener(torbutton_weblistener,
Components.interfaces.nsIWebProgress.NOTIFY_LOCATION);
// Wrap Google search service.
//torbutton_wrap_search_service();
torbutton_unique_pref_observer.register();
}
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -144,7 +144,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "أزل المنصة واللغة من استفسارات محرك بحث غوغل">
<!ENTITY torbutton.prefs.transparentTor "شفافية توريفكيشن (تحتاج موجه تور أو ترانسبوكسي مخصص)">
<!ENTITY torbutton.prefs.priv_caption "إعدادات الخصوصية">
<!ENTITY torbutton.prefs.block_disk "لا تسجل سجل التصفح أو بيانات المواقع الألكترونية (تفعيل التصفح الخصوصي)">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Google axtarış qutusunun Strip platformu və qapalı dil sorğusu">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -128,5 +128,4 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "scroogle.org">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Google Search Box queries မွ platform ႏွင့္ language မ်ားေျပာင္းရန္">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Desactiva les prioritats d'idioma dels suggeriments de la barra Google Search">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
......@@ -142,7 +142,6 @@
<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
<!ENTITY torbutton.prefs.engine4 "startpage.com">
<!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
<!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
<!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
<!ENTITY torbutton.prefs.block_disk "Don't record browsing history or website data (enables Private Browsing Mode)">
<!ENTITY torbutton.prefs.restrict_thirdparty "Restrict third party cookies and other tracking data">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment