From f14b0b0d8f8acb5372b3a01a0275f893217d4667 Mon Sep 17 00:00:00 2001 From: piro Date: Mon, 25 Oct 2010 02:36:47 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20586234=20=E2=80=93=20When=20middle=20clic?= =?UTF-8?q?king=20links=20in=20popups,=20open=20the=20new=20tab=20in=20a?= =?UTF-8?q?=20full=20browser=20window=20(=20https://bugzilla.mozilla.org/s?= =?UTF-8?q?how=5Fbug.cgi=3Fid=3D586234=20)=20=E3=81=AE=E5=BD=B1=E9=9F=BF?= =?UTF-8?q?=E3=81=A7=E3=80=81=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=E3=82=BF?= =?UTF-8?q?=E3=83=96=E3=81=A7=E9=96=8B=E3=81=84=E3=81=9F=E6=99=82=E3=81=AB?= =?UTF-8?q?=E5=AD=90=E3=82=BF=E3=83=96=E3=81=AB=E3=81=AA=E3=82=89=E3=81=AA?= =?UTF-8?q?=E3=81=8F=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7297 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 35 +++++++++++++++++++++++++--- modules/utils.js | 27 +++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 74a0ec97..1bb73734 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -257,6 +257,7 @@ var TreeStyleTabService = { if (this.getTreePref('openGroupBookmarkAsTabSubTree') !== null) { let behavior = 0; if (this.getTreePref('openGroupBookmarkAsTabSubTree.underParent')) + behavior += this.kGROUP_BOOKMARK_USE_DUMMY; if (!this.getTreePref('openGroupBookmarkBehavior.confirm')) { behavior += ( @@ -1036,12 +1037,12 @@ catch(e) { let source = this._getFunctionSource(aFunc); if (!source || !/^\(?function handleLinkClick/.test(source)) return false; - eval(aFunc+' = '+source.replace( + eval(aFunc+' = '+source.replace( // for -Firefox 3.6 /(openNewTabWith\()/g, - ).replace( + ).replace( // for -Firefox 3.6 /(event.ctrlKey|event.metaKey)/, - ).replace( + ).replace( // for -Firefox 3.6 /* あらゆるリンクからタブを開く設定の時に、アクセルキーが押されていた場合は 反転された動作(通常のリンク読み込み)を行う */ 'return false;case 1:', @@ -1082,11 +1083,38 @@ catch(e) { return false; case 1: ]]> + ).replace( // for Firefox 4.0- + 'where = whereToOpenLink(event);', + .toString() + ).replace( // for Firefox 4.0- + /(if \([^\)]*where == "current")/, + '$1 && !TSTFilteringResult.inverted' + ).replace( // for Firefox 4.0- + /(fromContent\s*:\s*true\s*,)/, + '$1 event : event, linkNode : linkNode, ' )); source = null; return true; }, this); + // for Firefox 4.0- + if ('openLinkIn' in window) { + eval('window.openLinkIn = '+ + window.openLinkIn.toSource().replace( + 'browser.loadOneTab(', + .toString() + ) + ); + } + this._splitFunctionNames( -1) { + aWhere = 'current'; + inverted = true; + } + return { + where : aWhere, + inverted : inverted, + divertedToTab : divertedToTab + }; + }, + _getDomainFromURI : function TSTUtils__getDomainFromURI(aURI) { if (!aURI) return null;