mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 12:34:11 +01:00
Convert expression closures to arrow syntax.
This commit is contained in:
@@ -47,7 +47,7 @@ const Config = Module("config", ConfigBase, {
|
||||
function () { window.toJavaScriptConsole(); }],
|
||||
dominspector: ["DOM Inspector",
|
||||
function () { window.inspectDOMDocument(window.content.document); },
|
||||
function () "inspectDOMDocument" in window],
|
||||
() => "inspectDOMDocument" in window],
|
||||
downloads: ["Manage Downloads",
|
||||
function () { window.toOpenWindowByType("Download:Manager", "chrome://mozapps/content/downloads/downloads.xul", "chrome,dialog=no,resizable"); }],
|
||||
newsmartplaylist: ["Open the file selector dialog",
|
||||
|
||||
@@ -36,7 +36,7 @@ const Library = Module("library", {
|
||||
*/
|
||||
getAlbums: function getAlbums(artist) {
|
||||
let albums = this._toJSArray(this.MAIN_LIBRARY.getItemsByProperty(SBProperties.artistName, artist))
|
||||
.map(function (track) track.getProperty(SBProperties.albumName));
|
||||
.map(track => track.getProperty(SBProperties.albumName));
|
||||
return array.uniq(albums);
|
||||
},
|
||||
|
||||
@@ -55,7 +55,7 @@ const Library = Module("library", {
|
||||
properties.appendProperty(SBProperties.albumName, album);
|
||||
|
||||
return this._toJSArray(this.MAIN_LIBRARY.getItemsByProperties(properties))
|
||||
.map(function (track) track.getProperty(SBProperties.trackName));
|
||||
.map(track => track.getProperty(SBProperties.trackName));
|
||||
}
|
||||
}, {
|
||||
}, {
|
||||
|
||||
@@ -343,7 +343,7 @@ const Player = Module("player", {
|
||||
onEnumerationEnd: function () { },
|
||||
onEnumeratedItem: function (list, item) {
|
||||
// FIXME: why are there null items and duplicates?
|
||||
if (!playlists.some(function (list) list.name == item.name) && item.name != null)
|
||||
if (!playlists.some(list => list.name == item.name) && item.name != null)
|
||||
playlists.push(item);
|
||||
return Ci.sbIMediaListEnumerationListener.CONTINUE;
|
||||
}
|
||||
@@ -372,7 +372,7 @@ const Player = Module("player", {
|
||||
getMediaPages: function getMediaPages() {
|
||||
let list = SBGetBrowser().currentMediaPage.mediaListView.mediaList;
|
||||
let pages = services.mediaPageManager.getAvailablePages(list);
|
||||
return ArrayConverter.JSArray(pages).map(function (page) page.QueryInterface(Ci.sbIMediaPageInfo));
|
||||
return ArrayConverter.JSArray(pages).map(page => page.QueryInterface(Ci.sbIMediaPageInfo));
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user