mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 01:54:11 +01:00
Replace expression closures (function expressions).
Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
@@ -12,55 +12,55 @@ var Config = Module("config", ConfigBase, {
|
||||
|
||||
dialogs: {
|
||||
about: ["About Firefox",
|
||||
function () { window.openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
() => { window.openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
addbookmark: ["Add bookmark for the current page",
|
||||
function () { window.PlacesCommandHook.bookmarkCurrentPage(true, window.PlacesUtils.bookmarksRootId); }],
|
||||
() => { window.PlacesCommandHook.bookmarkCurrentPage(true, window.PlacesUtils.bookmarksRootId); }],
|
||||
addons: ["Manage Add-ons",
|
||||
function () { window.BrowserOpenAddonsMgr(); }],
|
||||
() => { window.BrowserOpenAddonsMgr(); }],
|
||||
bookmarks: ["List your bookmarks",
|
||||
function () { window.openDialog("chrome://browser/content/bookmarks/bookmarksPanel.xul", "Bookmarks", "dialog,centerscreen,width=600,height=600"); }],
|
||||
() => { window.openDialog("chrome://browser/content/bookmarks/bookmarksPanel.xul", "Bookmarks", "dialog,centerscreen,width=600,height=600"); }],
|
||||
checkupdates: ["Check for updates",
|
||||
function () { window.checkForUpdates(); },
|
||||
() => { window.checkForUpdates(); },
|
||||
() => "checkForUpdates" in window],
|
||||
cookies: ["List your cookies",
|
||||
function () { window.toOpenWindowByType("Browser:Cookies", "chrome://browser/content/preferences/cookies.xul", "chrome,dialog=no,resizable"); }],
|
||||
() => { window.toOpenWindowByType("Browser:Cookies", "chrome://browser/content/preferences/cookies.xul", "chrome,dialog=no,resizable"); }],
|
||||
console: ["Browser console",
|
||||
function () { window.HUDService.toggleBrowserConsole(); }],
|
||||
() => { window.HUDService.toggleBrowserConsole(); }],
|
||||
customizetoolbar: ["Customize the Toolbar",
|
||||
function () { window.BrowserCustomizeToolbar(); }],
|
||||
() => { window.BrowserCustomizeToolbar(); }],
|
||||
dominspector: ["DOM Inspector",
|
||||
function () { window.inspectDOMDocument(window.content.document); },
|
||||
() => { window.inspectDOMDocument(window.content.document); },
|
||||
() => "inspectDOMDocument" in window],
|
||||
downloads: ["Manage Downloads",
|
||||
function () { window.BrowserDownloadsUI(); }],
|
||||
() => { window.BrowserDownloadsUI(); }],
|
||||
history: ["List your history",
|
||||
function () { window.openDialog("chrome://browser/content/history/history-panel.xul", "History", "dialog,centerscreen,width=600,height=600"); }],
|
||||
() => { window.openDialog("chrome://browser/content/history/history-panel.xul", "History", "dialog,centerscreen,width=600,height=600"); }],
|
||||
openfile: ["Open the file selector dialog",
|
||||
function () { window.BrowserOpenFileWindow(); }],
|
||||
() => { window.BrowserOpenFileWindow(); }],
|
||||
pageinfo: ["Show information about the current page",
|
||||
function () { window.BrowserPageInfo(); }],
|
||||
() => { window.BrowserPageInfo(); }],
|
||||
pagesource: ["View page source",
|
||||
function () { window.BrowserViewSourceOfDocument(window.content.document); }],
|
||||
() => { window.BrowserViewSourceOfDocument(window.content.document); }],
|
||||
passwords: ["Passwords dialog",
|
||||
function () { window.openDialog("chrome://passwordmgr/content/passwordManager.xul"); }],
|
||||
() => { window.openDialog("chrome://passwordmgr/content/passwordManager.xul"); }],
|
||||
places: ["Places Organizer: Manage your bookmarks and history",
|
||||
function () { window.PlacesCommandHook.showPlacesOrganizer(window.ORGANIZER_ROOT_BOOKMARKS); }],
|
||||
() => { window.PlacesCommandHook.showPlacesOrganizer(window.ORGANIZER_ROOT_BOOKMARKS); }],
|
||||
preferences: ["Show Firefox preferences dialog",
|
||||
function () { window.openPreferences(); }],
|
||||
() => { window.openPreferences(); }],
|
||||
printpreview: ["Preview the page before printing",
|
||||
function () { window.PrintUtils.printPreview(window.PrintPreviewListener || window.onEnterPrintPreview, window.onExitPrintPreview); }],
|
||||
() => { window.PrintUtils.printPreview(window.PrintPreviewListener || window.onEnterPrintPreview, window.onExitPrintPreview); }],
|
||||
printsetup: ["Setup the page size and orientation before printing",
|
||||
function () { window.PrintUtils.showPageSetup(); }],
|
||||
() => { window.PrintUtils.showPageSetup(); }],
|
||||
print: ["Show print dialog",
|
||||
function () { window.PrintUtils.print(); }],
|
||||
() => { window.PrintUtils.print(); }],
|
||||
saveframe: ["Save frame to disk",
|
||||
function () { window.saveFrameDocument(); }],
|
||||
() => { window.saveFrameDocument(); }],
|
||||
savepage: ["Save page to disk",
|
||||
function () { window.saveDocument(window.content.document); }],
|
||||
() => { window.saveDocument(window.content.document); }],
|
||||
searchengines: ["Manage installed search engines",
|
||||
function () { window.openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
() => { window.openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
selectionsource: ["View selection source",
|
||||
function () { modules.buffer.viewSelectionSource(); }]
|
||||
() => { modules.buffer.viewSelectionSource(); }]
|
||||
},
|
||||
|
||||
removeTab: function removeTab(tab) {
|
||||
@@ -215,7 +215,7 @@ var Config = Module("config", ConfigBase, {
|
||||
};
|
||||
},
|
||||
events: function initEvents(dactyl, modules, window) {
|
||||
modules.events.listen(window, "SidebarFocused", function (event) {
|
||||
modules.events.listen(window, "SidebarFocused", event => {
|
||||
modules.config.lastSidebar = window.document.getElementById("sidebar-box")
|
||||
.getAttribute("sidebarcommand");
|
||||
}, false);
|
||||
|
||||
Reference in New Issue
Block a user