fix careless misses

This commit is contained in:
Piro / SHIMODA Hiroshi 2010-11-18 01:08:40 +09:00
parent 6f90f24039
commit c1871b94c6
2 changed files with 11 additions and 4 deletions

View File

@ -359,7 +359,13 @@ var TreeStyleTabService = {
initUninstallationListener : function TSTService_initUninstallationListener()
{
var prefs = window['piro.sakura.ne.jp'].prefs;
var namespace = {};
Components.utils.import(
'resource://treestyletab-modules/prefs.js',
namespace
);
var prefs = namespace.prefs;
namespace = void(0);
var restorePrefs = function() {
if (!prefs) return;
[
@ -1040,7 +1046,8 @@ catch(e) {
eval(aFunc+' = '+source.replace( // for -Firefox 3.6
/(openNewTabWith\()/g,
<![CDATA[
if (!TreeStyleTabService.checkToOpenChildTab(event.target.ownerDocument.defaultView)) TreeStyleTabService.readyToOpenChildTab(event.target.ownerDocument.defaultView);
if (!TreeStyleTabService.checkToOpenChildTab(event.target.ownerDocument.defaultView))
TreeStyleTabService.readyToOpenChildTab(event.target.ownerDocument.defaultView);
$1]]>
).replace( // for -Firefox 3.6
/(event.ctrlKey|event.metaKey)/,

View File

@ -1347,7 +1347,6 @@ var TreeStyleTabUtils = {
var internal = info.internal || {};
var b = this.getTabBrowserFromFrame(frame);
var nextTab = b.treeStyleTab.getNextSiblingTab(currentTab);
var targetHost = this._getDomainFromURI(info.uri);
var currentTab = this.getTabFromFrame(frame);
@ -1373,8 +1372,9 @@ var TreeStyleTabUtils = {
parent = ('forceChild' in internal && !internal.forceChild) ? null :
(parentHost == targetHost && !internal.forceChild) ? parentTab :
frame ;
let nextTab = b.treeStyleTab.getNextSiblingTab(currentTab);
insertBefore = parentHost == targetHost && !internal.forceChild &&
(this.getTreePref('insertNewChildAt') == this.kINSERT_FIRST ?
(this.getTreePref('insertNewChildAt') == 0 ?
nextTab :
(
b.treeStyleTab.getTabById(currentTab.__treestyletab__next) ||