Fix typos

This commit is contained in:
janekptacijarabaci 2018-07-29 12:29:40 +02:00 committed by Roy Tam
commit ad8a1e1f50
4 changed files with 10 additions and 15 deletions

View file

@ -413,8 +413,7 @@ this.DownloadsCommon = {
* complete. * complete.
* percentComplete : The percentage of bytes successfully downloaded. * percentComplete : The percentage of bytes successfully downloaded.
*/ */
summarizeDownloads(downloads) { summarizeDownloads(downloads) {
{
let summary = { let summary = {
numActive: 0, numActive: 0,
numPaused: 0, numPaused: 0,
@ -1480,7 +1479,6 @@ const DownloadsViewPrototype = {
* @note Subclasses should override this. * @note Subclasses should override this.
*/ */
onDownloadChanged(download) { onDownloadChanged(download) {
{
throw Components.results.NS_ERROR_NOT_IMPLEMENTED; throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
}, },
@ -1574,7 +1572,6 @@ DownloadsIndicatorDataCtor.prototype = {
}, },
onDownloadAdded(download, newest) { onDownloadAdded(download, newest) {
{
this._itemCount++; this._itemCount++;
this._updateViews(); this._updateViews();
}, },
@ -1691,7 +1688,7 @@ DownloadsIndicatorDataCtor.prototype = {
* to generate statistics about the downloads we care about - in this case, * to generate statistics about the downloads we care about - in this case,
* it's all active downloads. * it's all active downloads.
*/ */
_activeDownloads() { _activeDownloads: function* () {
let downloads = this._isPrivate ? PrivateDownloadsData.downloads let downloads = this._isPrivate ? PrivateDownloadsData.downloads
: DownloadsData.downloads; : DownloadsData.downloads;
for (let download of downloads) { for (let download of downloads) {
@ -1897,7 +1894,7 @@ DownloadsSummaryData.prototype = {
* it's the downloads in this._downloads after the first few to exclude, * it's the downloads in this._downloads after the first few to exclude,
* which was set when constructing this DownloadsSummaryData instance. * which was set when constructing this DownloadsSummaryData instance.
*/ */
_downloadsForSummary() { _downloadsForSummary: function* () {
if (this._downloads.length > 0) { if (this._downloads.length > 0) {
for (let i = this._numToExclude; i < this._downloads.length; ++i) { for (let i = this._numToExclude; i < this._downloads.length; ++i) {
yield this._downloads[i]; yield this._downloads[i];

View file

@ -251,8 +251,9 @@ HistoryDownloadElementShell.prototype = {
if (this.element.selected) { if (this.element.selected) {
goUpdateDownloadCommands(); goUpdateDownloadCommands();
else } else {
goUpdateCommand("downloadsCmd_clearDownloads"); goUpdateCommand("downloadsCmd_clearDownloads");
}
}, },
onChanged() { onChanged() {
@ -720,7 +721,6 @@ DownloadsPlacesView.prototype = {
// the top of the richlistbox, along with other session downloads. // the top of the richlistbox, along with other session downloads.
// More generally, if a new download is added, should be made visible. // More generally, if a new download is added, should be made visible.
this._richlistbox.ensureElementIsVisible(newOrUpdatedShell.element); this._richlistbox.ensureElementIsVisible(newOrUpdatedShell.element);
}
} else if (sessionDownload) { } else if (sessionDownload) {
let before = this._lastSessionDownloadElement ? let before = this._lastSessionDownloadElement ?
this._lastSessionDownloadElement.nextSibling : this._richlistbox.firstChild; this._lastSessionDownloadElement.nextSibling : this._richlistbox.firstChild;

View file

@ -807,7 +807,6 @@ const DownloadsView = {
* asynchronous data load. * asynchronous data load.
*/ */
onDownloadAdded(download, aNewest) { onDownloadAdded(download, aNewest) {
{
DownloadsCommon.log("A new download data item was added - aNewest =", DownloadsCommon.log("A new download data item was added - aNewest =",
aNewest); aNewest);
@ -911,7 +910,6 @@ const DownloadsView = {
* Removes the view item associated with the specified data item. * Removes the view item associated with the specified data item.
*/ */
_removeViewItem(download) { _removeViewItem(download) {
{
DownloadsCommon.log("Removing a DownloadsViewItem from the downloads list."); DownloadsCommon.log("Removing a DownloadsViewItem from the downloads list.");
let element = this._visibleViewItems.get(download).element; let element = this._visibleViewItems.get(download).element;
let previousSelectedIndex = this.richListBox.selectedIndex; let previousSelectedIndex = this.richListBox.selectedIndex;

View file

@ -12,7 +12,7 @@
"use strict"; "use strict";
let { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm");
@ -91,16 +91,16 @@ DownloadElementShell.prototype = {
get extendedDisplayName() { get extendedDisplayName() {
let s = DownloadsCommon.strings; let s = DownloadsCommon.strings;
let referrer = this.dataItem.download.source.referrer || let referrer = this.download.source.referrer ||
this.dataItem.download.source.url; this.download.source.url;
let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer); let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer);
return s.statusSeparator(this.displayName, displayHost); return s.statusSeparator(this.displayName, displayHost);
}, },
get extendedDisplayNameTip() { get extendedDisplayNameTip() {
let s = DownloadsCommon.strings; let s = DownloadsCommon.strings;
let referrer = this.dataItem.download.source.referrer || let referrer = this.download.source.referrer ||
this.dataItem.download.source.url; this.download.source.url;
let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer); let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer);
return s.statusSeparator(this.displayName, fullHost); return s.statusSeparator(this.displayName, fullHost);
}, },