Use Function.bind() instead of 'self'.
This commit is contained in:
parent
cec873a303
commit
d2ee91b604
@ -384,16 +384,15 @@ TreeStyleTabWindow.prototype = {
|
|||||||
|
|
||||||
initUninstallationListener : function TSTWindow_initUninstallationListener()
|
initUninstallationListener : function TSTWindow_initUninstallationListener()
|
||||||
{
|
{
|
||||||
var self = this;
|
|
||||||
var restorePrefs = function() {
|
var restorePrefs = function() {
|
||||||
if (prefs.getPref('extensions.treestyletab.tabsOnTop.originalState')) {
|
if (prefs.getPref('extensions.treestyletab.tabsOnTop.originalState')) {
|
||||||
prefs.clearPref('extensions.treestyletab.tabsOnTop.originalState');
|
prefs.clearPref('extensions.treestyletab.tabsOnTop.originalState');
|
||||||
try {
|
try {
|
||||||
self.browser.treeStyleTab.position = 'top';
|
this.browser.treeStyleTab.position = 'top';
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
}
|
}
|
||||||
self.window.TabsOnTop.enabled = true;
|
this.window.TabsOnTop.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let restorePrefs = [
|
let restorePrefs = [
|
||||||
@ -413,7 +412,7 @@ TreeStyleTabWindow.prototype = {
|
|||||||
// clear backup pref.
|
// clear backup pref.
|
||||||
prefs.clearPref(pref+'.backup');
|
prefs.clearPref(pref+'.backup');
|
||||||
}
|
}
|
||||||
};
|
}.bind(this);
|
||||||
new this.window['piro.sakura.ne.jp'].UninstallationListener({
|
new this.window['piro.sakura.ne.jp'].UninstallationListener({
|
||||||
id : 'treestyletab@piro.sakura.ne.jp',
|
id : 'treestyletab@piro.sakura.ne.jp',
|
||||||
onuninstalled : restorePrefs,
|
onuninstalled : restorePrefs,
|
||||||
|
Loading…
Reference in New Issue
Block a user