[Pkg-mozext-commits] [tabmixplus] 02/44: Follow up bug 1067888 - Add autocomplete result type for searching via current search engine

David Prévot taffit at moszumanska.debian.org
Wed Oct 15 02:09:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit ecb490163800eefb5a7339018c4d1954d05f4ce9
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sat Sep 27 11:50:14 2014 +0300

    Follow up bug 1067888 - Add autocomplete result type for searching via current search engine
---
 chrome/content/links/setup.js | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/chrome/content/links/setup.js b/chrome/content/links/setup.js
index a967aac..7024283 100644
--- a/chrome/content/links/setup.js
+++ b/chrome/content/links/setup.js
@@ -28,14 +28,16 @@ Tabmix.linkHandling_init = function TMP_TBP_init(aWindowType) {
     // https://addons.mozilla.org/en-US/firefox/addon/quieturl/
     let fn = typeof autoComplete._QuietUrlPopupClickOld == "function" ?
         "_QuietUrlPopupClickOld" : "PopupAutoCompleteRichResult.onPopupClick";
+    let n = '\n            ';
     this.changeCode(autoComplete, fn)._replace(
-      'openUILink(url, aEvent);',
-      'var isBlankTab = gBrowser.isBlankNotBusyTab(gBrowser.mCurrentTab);' +
-      'var where = isBlankTab ? "current" : whereToOpenLink(aEvent);' +
-      'var pref = "extensions.tabmix.loadUrlInBackground";' +
-      'openUILinkIn(url, where, {' +
-      '       inBackground: Services.prefs.getBoolPref(pref),' +
-      '       initiatingDoc: aEvent ? aEvent.target.ownerDocument : null});'
+      /openUILink\(url, aEvent.*\);/,
+      'var tabmixOptions = typeof options == "object" ? options : {};' + n +
+      'var isBlankTab = gBrowser.isBlankNotBusyTab(gBrowser.mCurrentTab);' + n +
+      'var where = isBlankTab ? "current" : whereToOpenLink(aEvent);' + n +
+      'var pref = "extensions.tabmix.loadUrlInBackground";' + n +
+      'tabmixOptions.inBackground = Services.prefs.getBoolPref(pref);' + n +
+      'tabmixOptions.initiatingDoc = aEvent ? aEvent.target.ownerDocument : null;' + n +
+      'openUILinkIn(url, where, tabmixOptions);'
     ).toCode();
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list