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() 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() { var restorePrefs = function() {
if (!prefs) return; if (!prefs) return;
[ [
@ -1040,7 +1046,8 @@ catch(e) {
eval(aFunc+' = '+source.replace( // for -Firefox 3.6 eval(aFunc+' = '+source.replace( // for -Firefox 3.6
/(openNewTabWith\()/g, /(openNewTabWith\()/g,
<![CDATA[ <![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]]> $1]]>
).replace( // for -Firefox 3.6 ).replace( // for -Firefox 3.6
/(event.ctrlKey|event.metaKey)/, /(event.ctrlKey|event.metaKey)/,

View File

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