diff --git a/browser/components/preferences/aboutPermissions.js b/browser/components/preferences/aboutPermissions.js index 22b527558d09..14a2bf966254 100644 --- a/browser/components/preferences/aboutPermissions.js +++ b/browser/components/preferences/aboutPermissions.js @@ -331,8 +331,12 @@ var PermissionDefaults = { let value = (aValue != this.DENY); Services.prefs.setBoolPref("dom.push.enabled", value); }, - get camera() this.UNKNOWN, - get microphone() this.UNKNOWN + get camera() { + return this.UNKNOWN; + }, + get microphone() { + return this.UNKNOWN; + } }; /** diff --git a/browser/components/preferences/in-content/applications.js b/browser/components/preferences/in-content/applications.js index 56e6baa8e5aa..a8ff7cb306b6 100644 --- a/browser/components/preferences/in-content/applications.js +++ b/browser/components/preferences/in-content/applications.js @@ -403,7 +403,7 @@ HandlerInfoWrapper.prototype = { var disabledPluginTypes = this._getDisabledPluginTypes(); var type = this.type; - disabledPluginTypes = disabledPluginTypes.filter(function(v) v != type); + disabledPluginTypes = disabledPluginTypes.filter(v => v != type); this._prefSvc.setCharPref(PREF_DISABLED_PLUGIN_TYPES, disabledPluginTypes.join(",")); @@ -1549,7 +1549,7 @@ var gApplicationsPane = { case Ci.nsIHandlerInfo.useHelperApp: if (preferredApp) menu.selectedItem = - possibleAppMenuItems.filter(function(v) v.handlerApp.equals(preferredApp))[0]; + possibleAppMenuItems.filter(v => v.handlerApp.equals(preferredApp))[0]; break; case kActionUsePlugin: menu.selectedItem = pluginMenuItem; diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js index 26c89d5b43fc..8108d712559a 100644 --- a/browser/components/preferences/in-content/main.js +++ b/browser/components/preferences/in-content/main.js @@ -298,7 +298,9 @@ var gMainPane = { { let homePage = document.getElementById("browser.startup.homepage"); let tabs = this._getTabsForHomePage(); - function getTabURI(t) t.linkedBrowser.currentURI.spec; + function getTabURI(t) { + return t.linkedBrowser.currentURI.spec; + } // FIXME Bug 244192: using dangerous "|" joiner! if (tabs.length) diff --git a/browser/components/preferences/in-content/privacy.js b/browser/components/preferences/in-content/privacy.js index a10e1c7b2cd4..8a7c6ce92a5a 100644 --- a/browser/components/preferences/in-content/privacy.js +++ b/browser/components/preferences/in-content/privacy.js @@ -179,8 +179,7 @@ var gPrivacyPane = { initializeHistoryMode: function PPP_initializeHistoryMode() { let mode; - let getVal = function (aPref) - document.getElementById(aPref).value; + let getVal = aPref => document.getElementById(aPref).value; if (this._checkDefaultValues(this.prefsForDefault)) { if (getVal("browser.privatebrowsing.autostart")) diff --git a/browser/components/preferences/in-content/search.js b/browser/components/preferences/in-content/search.js index 9b2df3d62570..23ca3da7d678 100644 --- a/browser/components/preferences/in-content/search.js +++ b/browser/components/preferences/in-content/search.js @@ -318,7 +318,7 @@ function EngineStore() { this._defaultEngines = Services.search.getDefaultEngines().map(this._cloneEngine, this); // check if we need to disable the restore defaults button - var someHidden = this._defaultEngines.some(function (e) e.hidden); + var someHidden = this._defaultEngines.some(e => e.hidden); gSearchPane.showRestoreDefaults(someHidden); } EngineStore.prototype = { diff --git a/browser/components/preferences/translation.js b/browser/components/preferences/translation.js index b10baf761e32..cb977fc394fd 100644 --- a/browser/components/preferences/translation.js +++ b/browser/components/preferences/translation.js @@ -25,9 +25,15 @@ function Tree(aId, aData) } Tree.prototype = { - get boxObject() this._tree.treeBoxObject, - get isEmpty() !this._data.length, - get hasSelection() this.selection.count > 0, + get boxObject() { + return this._tree.treeBoxObject; + }, + get isEmpty() { + return !this._data.length; + }, + get hasSelection() { + return this.selection.count > 0; + }, getSelectedItems: function() { let result = []; @@ -43,19 +49,35 @@ Tree.prototype = { }, // nsITreeView implementation - get rowCount() this._data.length, - getCellText: function (aRow, aColumn) this._data[aRow], - isSeparator: function(aIndex) false, - isSorted: function() false, - isContainer: function(aIndex) false, + get rowCount() { + return this._data.length; + }, + getCellText: function (aRow, aColumn) { + return this._data[aRow]; + }, + isSeparator: function(aIndex) { + return false; + }, + isSorted: function() { + return false; + }, + isContainer: function(aIndex) { + return false; + }, setTree: function(aTree) {}, getImageSrc: function(aRow, aColumn) {}, getProgressMode: function(aRow, aColumn) {}, getCellValue: function(aRow, aColumn) {}, cycleHeader: function(column) {}, - getRowProperties: function(row) "", - getColumnProperties: function(column) "", - getCellProperties: function(row, column) "", + getRowProperties: function(row) { + return ""; + }, + getColumnProperties: function(column) { + return ""; + }, + getCellProperties: function(row, column) { + return ""; + }, QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView]) }; @@ -66,7 +88,9 @@ function Lang(aCode) } Lang.prototype = { - toString: function() this._label + toString: function() { + return this._label; + } } var gTranslationExceptions = {