[Pkg-mozext-commits] [tabmixplus] 11/44: Move the changes to openUILinkIn into the beginning of openLinkIn, Allow to load url to the current tab when caller is ReaderParent.toggleReaderMode
    David Prévot 
    taffit at moszumanska.debian.org
       
    Fri Mar 18 20:57:14 UTC 2016
    
    
  
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 789d0323868d2f2de3787bb7ca366c692312557c
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sat Feb 27 10:45:51 2016 +0200
    Move the changes to openUILinkIn into the beginning of openLinkIn, Allow to load url to the current tab when caller is ReaderParent.toggleReaderMode
---
 chrome/content/places/places.js | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index 44b16bf..9875186 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -699,17 +699,20 @@ Tabmix.onContentLoaded = {
       'return Tabmix.getSingleWindowMode() ? "tab" : "window";'
     ).toCode();
 
-    Tabmix.changeCode(window, "openUILinkIn")._replace(
-      'params.fromChrome = true;',
-      '$&\n' +
-      '  if (Tabmix.isCallerInList("BG_observe"))\n' +
-      '    params.inBackground = getBoolPref("browser.tabs.loadInBackground");'
-    ).toCode();
-
     // update incompatibility with X-notifier(aka WebMail Notifier) 2.9.13+
     // in case it warp the function in its object
     let [fnObj, fnName] = this.getXnotifierFunction("openLinkIn");
     Tabmix.changeCode(fnObj, fnName)._replace(
+      '{',
+      '{\n' +
+      '  let tabmixCaller = Tabmix.getCallerNameByIndex(2);\n' +
+      '  if (tabmixCaller == "BG_observe") {\n' +
+      '    params.inBackground = getBoolPref("browser.tabs.loadInBackground");\n' +
+      '  } else if (where == "current" &&\n' +
+      '      tabmixCaller == "ReaderParent.toggleReaderMode") {\n' +
+      '    gBrowser.selectedBrowser.tabmix_allowLoad = true;\n' +
+      '  }\n'
+    )._replace(
       /aRelatedToCurrent\s*= params.relatedToCurrent;/,
       '$&\n' +
       '  var bookMarkId            = params.bookMarkId;'
-- 
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