Uniform coding style

This commit is contained in:
YUKI Hiroshi 2014-10-22 13:37:08 +09:00
parent 8c6e28ea0d
commit e48cf4e38b
2 changed files with 14 additions and 9 deletions

View File

@ -166,9 +166,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
if (node._scrollbox)
node = node._scrollbox;
var boxObject = (node.scrollBoxObject || node.boxObject);
try {
try {
boxObject = boxObject.QueryInterface(Ci.nsIScrollBoxObject); // for Tab Mix Plus (ensure scrollbox-ed)
} catch (ex) { /* May not implement this interface e.g. after bug 979835 */ }
}
catch(e) {
// May not implement this interface e.g. after bug 979835
}
return boxObject;
},

View File

@ -6,10 +6,9 @@
.autoScroll
.processAutoScroll(mouseMoveOrDragOverEvent);
license: The MIT License, Copyright (c) 2009-2012 YUKI "Piro" Hiroshi
http://github.com/piroor/fxaddonlibs/blob/master/license.txt
license: The MIT License, Copyright (c) 2009-2014 YUKI "Piro" Hiroshi
original:
http://github.com/piroor/fxaddonlibs/blob/master/autoScroll.js
http://github.com/piroor/fxaddonlib-autoscroll
*/
/* To work as a JS Code Module */
@ -30,7 +29,7 @@ if (typeof window == 'undefined' ||
}
(function() {
const currentRevision = 6;
const currentRevision = 7;
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
@ -164,10 +163,13 @@ if (typeof window == 'undefined' ||
getScrollBoxObject : function(aTabBrowser)
{
var box = this.getScrollBox(aTabBrowser);
var boxObject = (box.scrollBoxObject || box.boxObject);
var boxObject = box.scrollBoxObject || box.boxObject;
try {
boxObject = boxObject.QueryInterface(Ci.nsIScrollBoxObject); // for Tab Mix Plus (ensure scrollbox-ed)
} catch (ex) { /* May not implement this interface e.g. after bug 979835 */ }
boxObject = boxObject.QueryInterface(Ci.nsIScrollBoxObject); // Tab Mix Plus
}
catch(e) {
// May not implement this interface e.g. after bug 979835
}
return boxObject;
},