mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 14:34:12 +01:00
Replace expression closures (getters).
Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
@@ -31,8 +31,8 @@ const Config = Module("config", ConfigBase, {
|
||||
|
||||
// FIXME: unless I'm seeing double in in the wee small hours gBrowser is
|
||||
// first set from getBrowser which they've deprecated in FF.
|
||||
get browser() window.getBrowser(),
|
||||
get tabbrowser() window.getBrowser(),
|
||||
get browser() { return window.getBrowser(); },
|
||||
get tabbrowser() { return window.getBrowser(); },
|
||||
|
||||
dialogs: {
|
||||
about: ["About Songbird",
|
||||
@@ -86,7 +86,10 @@ const Config = Module("config", ConfigBase, {
|
||||
modes.pop();
|
||||
},
|
||||
|
||||
get isPlayerWindow() window.SBGetBrowser().mCurrentTab == window.SBGetBrowser().mediaTab,
|
||||
get isPlayerWindow() {
|
||||
let browser = window.SBGetBrowser();
|
||||
return browser.mCurrentTab == browser.mediaTab;
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows or hides the main service pane.
|
||||
@@ -138,7 +141,7 @@ const Config = Module("config", ConfigBase, {
|
||||
defaults: {
|
||||
guioptions: "bCmprs",
|
||||
showtabline: 2,
|
||||
get titlestring() config.name
|
||||
get titlestring() { return config.name; }
|
||||
},
|
||||
|
||||
guioptions: {
|
||||
|
||||
@@ -80,12 +80,12 @@ const Player = Module("player", {
|
||||
},
|
||||
|
||||
/** @property {sbIMediaListView} The current media list view. @private */
|
||||
get _currentView() SBGetBrowser().currentMediaListView,
|
||||
get _currentView() { return SBGetBrowser().currentMediaListView; },
|
||||
|
||||
/**
|
||||
* @property {number} The player volume in the range 0.0-1.0.
|
||||
*/
|
||||
get volume() gMM.volumeControl.volume,
|
||||
get volume() { return gMM.volumeControl.volume; },
|
||||
set volume(value) {
|
||||
gMM.volumeControl.volume = value;
|
||||
},
|
||||
@@ -465,11 +465,13 @@ const Player = Module("player", {
|
||||
|
||||
historyKey: "search-view",
|
||||
|
||||
get prompt() this.mode === modules.modes.SEARCH_VIEW_BACKWARD ? "?" : "/",
|
||||
get prompt() {
|
||||
return this.mode === modules.modes.SEARCH_VIEW_BACKWARD ? "?" : "/";
|
||||
},
|
||||
|
||||
get onCancel() player.closure.onSearchCancel,
|
||||
get onChange() player.closure.onSearchKeyPress,
|
||||
get onSubmit() player.closure.onSearchSubmit
|
||||
get onCancel() { return player.closure.onSearchCancel; },
|
||||
get onChange() { return player.closure.onSearchKeyPress; },
|
||||
get onSubmit() { return player.closure.onSearchSubmit; }
|
||||
});
|
||||
},
|
||||
commands: function initCommands() {
|
||||
|
||||
Reference in New Issue
Block a user