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;