[Pale-Moon] Remove excess whitespace.

This commit is contained in:
athenian200 2020-02-06 09:46:16 -06:00 • committed by Roy Tam
commit b6b33a6b2a
73 changed files with 1883 additions and 1883 deletions

View file

@ -16,7 +16,7 @@ var gAdvancedPane = {
/**
* Brings the appropriate tab to the front and initializes various bits of UI.
*/
init: function ()
init: function()
{
this._inited = true;
var advancedPrefs = document.getElementById("advancedPrefs");
@ -61,7 +61,7 @@ var gAdvancedPane = {
* Stores the identity of the current tab in preferences so that the selected
* tab can be persisted between openings of the preferences window.
*/
tabSelectionChanged: function ()
tabSelectionChanged: function()
{
if (!this._inited)
return;
@ -109,7 +109,7 @@ var gAdvancedPane = {
* the current value to enable proper pref restoration if the checkbox is
* never changed.
*/
readCheckSpelling: function ()
readCheckSpelling: function()
{
var pref = document.getElementById("layout.spellcheckDefault");
this._storedSpellCheck = pref.value;
@ -122,7 +122,7 @@ var gAdvancedPane = {
* preserving the preference's "hidden" value if the preference is
* unchanged and represents a value not strictly allowed in UI.
*/
writeCheckSpelling: function ()
writeCheckSpelling: function()
{
var checkbox = document.getElementById("checkSpelling");
return checkbox.checked ? (this._storedSpellCheck == 2 ? 2 : 1) : 0;
@ -132,7 +132,7 @@ var gAdvancedPane = {
* security.OCSP.enabled is an integer value for legacy reasons.
* A value of 1 means OCSP is enabled. Any other value means it is disabled.
*/
readEnableOCSP: function ()
readEnableOCSP: function()
{
var preference = document.getElementById("security.OCSP.enabled");
// This is the case if the preference is the default value.
@ -145,7 +145,7 @@ var gAdvancedPane = {
/**
* See documentation for readEnableOCSP.
*/
writeEnableOCSP: function ()
writeEnableOCSP: function()
{
var checkbox = document.getElementById("enableOCSP");
return checkbox.checked ? 1 : 0;
@ -178,7 +178,7 @@ var gAdvancedPane = {
/**
* opening links behind a modal dialog is poor form. Work around flawed text-link handling here.
*/
openTextLink: function (evt) {
openTextLink: function(evt) {
let where = Services.prefs.getBoolPref("browser.preferences.instantApply") ? "tab" : "window";
openUILinkIn(evt.target.getAttribute("href"), where);
evt.preventDefault();
@ -187,7 +187,7 @@ var gAdvancedPane = {
/**
* Set up or hide the Learn More links for various data collection options
*/
_setupLearnMoreLink: function (pref, element) {
_setupLearnMoreLink: function(pref, element) {
// set up the Learn More link with the correct URL
let url = Services.prefs.getCharPref(pref);
let el = document.getElementById(element);
@ -212,14 +212,14 @@ var gAdvancedPane = {
/**
* Displays a dialog in which proxy settings may be changed.
*/
showConnections: function ()
showConnections: function()
{
document.documentElement.openSubDialog("chrome://browser/content/preferences/connection.xul",
"", null);
},
// Retrieves the amount of space currently used by disk cache
updateActualCacheSize: function ()
updateActualCacheSize: function()
{
var sum = 0;
function updateUI(consumption) {
@ -233,7 +233,7 @@ var gAdvancedPane = {
Visitor.prototype = {
expected: 0,
sum: 0,
QueryInterface: function (iid) {
QueryInterface: function(iid) {
if (iid.equals(Components.interfaces.nsISupports) ||
iid.equals(Components.interfaces.nsICacheStorageVisitor)) {
return this;
@ -266,10 +266,10 @@ var gAdvancedPane = {
},
// Retrieves the amount of space currently used by offline cache
updateActualAppCacheSize: function ()
updateActualAppCacheSize: function()
{
var visitor = {
onCacheStorageInfo: function (aEntryCount, aConsumption, aCapacity, aDiskDirectory)
onCacheStorageInfo: function(aEntryCount, aConsumption, aCapacity, aDiskDirectory)
{
var actualSizeLabel = document.getElementById("actualAppCacheSize");
var sizeStrings = DownloadUtils.convertByteUnits(aConsumption);
@ -286,14 +286,14 @@ var gAdvancedPane = {
storage.asyncVisitStorage(visitor, false);
},
updateCacheSizeUI: function (smartSizeEnabled)
updateCacheSizeUI: function(smartSizeEnabled)
{
document.getElementById("useCacheBefore").disabled = smartSizeEnabled;
document.getElementById("cacheSize").disabled = smartSizeEnabled;
document.getElementById("useCacheAfter").disabled = smartSizeEnabled;
},
readSmartSizeEnabled: function ()
readSmartSizeEnabled: function()
{
// The smart_size.enabled preference element is inverted="true", so its
// value is the opposite of the actual pref value
@ -305,7 +305,7 @@ var gAdvancedPane = {
* Converts the cache size from units of KB to units of MB and returns that
* value.
*/
readCacheSize: function ()
readCacheSize: function()
{
var preference = document.getElementById("browser.cache.disk.capacity");
return preference.value / 1024;
@ -315,7 +315,7 @@ var gAdvancedPane = {
* Converts the cache size as specified in UI (in MB) to KB and returns that
* value.
*/
writeCacheSize: function ()
writeCacheSize: function()
{
var cacheSize = document.getElementById("cacheSize");
var intValue = parseInt(cacheSize.value, 10);
@ -325,7 +325,7 @@ var gAdvancedPane = {
/**
* Clears the cache.
*/
clearCache: function ()
clearCache: function()
{
var cache = Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Components.interfaces.nsICacheStorageService);
@ -338,7 +338,7 @@ var gAdvancedPane = {
/**
* Clears the application cache.
*/
clearOfflineAppCache: function ()
clearOfflineAppCache: function()
{
Components.utils.import("resource:///modules/offlineAppCache.jsm");
OfflineAppCacheHelper.clear();
@ -389,7 +389,7 @@ var gAdvancedPane = {
},
// XXX: duplicated in browser.js
_getOfflineAppUsage: function (perm, groups)
_getOfflineAppUsage: function(perm, groups)
{
var cacheService = Components.classes["@mozilla.org/network/application-cache-service;1"].
getService(Components.interfaces.nsIApplicationCacheService);
@ -414,7 +414,7 @@ var gAdvancedPane = {
/**
* Updates the list of offline applications
*/
updateOfflineApps: function ()
updateOfflineApps: function()
{
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
@ -560,7 +560,7 @@ var gAdvancedPane = {
* iii 0/1/2 f false
* iii 0/1/2 *t* *true*
*/
updateReadPrefs: function ()
updateReadPrefs: function()
{
var enabledPref = document.getElementById("app.update.enabled");
var autoPref = document.getElementById("app.update.auto");
@ -592,7 +592,7 @@ var gAdvancedPane = {
* Sets the pref values based on the selected item of the radiogroup,
* and sets the disabled state of the warnIncompatible checkbox accordingly.
*/
updateWritePrefs: function ()
updateWritePrefs: function()
{
var enabledPref = document.getElementById("app.update.enabled");
var autoPref = document.getElementById("app.update.auto");
@ -641,7 +641,7 @@ var gAdvancedPane = {
* 2 Checked Warn if there are incompatibilities,
* or the update is major.
*/
readAddonWarn: function ()
readAddonWarn: function()
{
var preference = document.getElementById("app.update.mode");
var warn = preference.value != 0;
@ -654,7 +654,7 @@ var gAdvancedPane = {
* themes" checkbox into the integer preference which represents it,
* returning that value.
*/
writeAddonWarn: function ()
writeAddonWarn: function()
{
var warnIncompatible = document.getElementById("warnIncompatible");
return !warnIncompatible.checked ? 0 : gAdvancedPane._modePreference;
@ -663,7 +663,7 @@ var gAdvancedPane = {
/**
* Displays the history of installed updates.
*/
showUpdates: function ()
showUpdates: function()
{
var prompter = Components.classes["@mozilla.org/updates/update-prompt;1"]
.createInstance(Components.interfaces.nsIUpdatePrompt);
@ -688,7 +688,7 @@ var gAdvancedPane = {
/**
* Displays the user's certificates and associated options.
*/
showCertificates: function ()
showCertificates: function()
{
document.documentElement.openWindow("mozilla:certmanager",
"chrome://pippki/content/certManager.xul",
@ -698,7 +698,7 @@ var gAdvancedPane = {
/**
* Displays a dialog from which the user can manage his security devices.
*/
showSecurityDevices: function ()
showSecurityDevices: function()
{
document.documentElement.openWindow("mozilla:devicemanager",
"chrome://pippki/content/device_manager.xul",

View file

@ -10,7 +10,7 @@ var Ci = Components.interfaces;
var gAppManagerDialog = {
_removed: [],
init: function () {
init: function() {
this.handlerInfo = window.arguments[0];
var bundle = document.getElementById("appManagerBundle");
@ -44,7 +44,7 @@ var gAppManagerDialog = {
list.selectedIndex = 0;
},
onOK: function () {
onOK: function() {
if (!this._removed.length) {
// return early to avoid calling the |store| method.
return;
@ -56,11 +56,11 @@ var gAppManagerDialog = {
this.handlerInfo.store();
},
onCancel: function () {
onCancel: function() {
// do nothing
},
remove: function () {
remove: function() {
var list = document.getElementById("appList");
this._removed.push(list.selectedItem.app);
var index = list.selectedIndex;
@ -78,7 +78,7 @@ var gAppManagerDialog = {
}
},
onSelect: function () {
onSelect: function() {
var list = document.getElementById("appList");
if (!list.selectedItem) {
document.getElementById("remove").disabled = true;

View file

@ -17,7 +17,7 @@ var gCookiesWindow = {
_tree : null,
_bundle : null,
init: function () {
init: function() {
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.addObserver(this, "cookie-changed", false);
@ -36,14 +36,14 @@ var gCookiesWindow = {
document.getElementById("filter").focus();
},
uninit: function () {
uninit: function() {
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.removeObserver(this, "cookie-changed");
os.removeObserver(this, "perm-changed");
},
_populateList: function (aInitialLoad) {
_populateList: function(aInitialLoad) {
this._loadCookies();
this._tree.view = this._view;
if (aInitialLoad)
@ -67,7 +67,7 @@ var gCookiesWindow = {
this._saveState();
},
_cookieEquals: function (aCookieA, aCookieB, aStrippedHost) {
_cookieEquals: function(aCookieA, aCookieB, aStrippedHost) {
return aCookieA.rawHost == aStrippedHost &&
aCookieA.name == aCookieB.name &&
aCookieA.path == aCookieB.path &&
@ -75,7 +75,7 @@ var gCookiesWindow = {
aCookieB.originAttributes);
},
observe: function (aCookie, aTopic, aData) {
observe: function(aCookie, aTopic, aData) {
if (aTopic != "cookie-changed")
return;
@ -108,7 +108,7 @@ var gCookiesWindow = {
// and is rather complicated as selection tracking is difficult
},
_handleCookieChanged: function (changedCookie, strippedHost) {
_handleCookieChanged: function(changedCookie, strippedHost) {
var rowIndex = 0;
var cookieItem = null;
if (!this._view._filtered) {
@ -159,7 +159,7 @@ var gCookiesWindow = {
this._updateCookieData(cookieItem);
},
_handleCookieAdded: function (changedCookie, strippedHost) {
_handleCookieAdded: function(changedCookie, strippedHost) {
var rowCountImpact = 0;
var addedHost = { value: 0 };
this._addCookie(strippedHost, changedCookie, addedHost);
@ -199,7 +199,7 @@ var gCookiesWindow = {
return this._rowCount;
},
_getItemAtIndex: function (aIndex) {
_getItemAtIndex: function(aIndex) {
if (this._filtered)
return this._filterSet[aIndex];
@ -255,7 +255,7 @@ var gCookiesWindow = {
return null;
},
_removeItemAtIndex: function (aIndex, aCount) {
_removeItemAtIndex: function(aIndex, aCount) {
var removeCount = aCount === undefined ? 1 : aCount;
if (this._filtered) {
// remove the cookies from the unfiltered set so that they
@ -294,11 +294,11 @@ var gCookiesWindow = {
}
},
_invalidateCache: function (aIndex) {
_invalidateCache: function(aIndex) {
this._cacheValid = Math.min(this._cacheValid, aIndex);
},
getCellText: function (aIndex, aColumn) {
getCellText: function(aIndex, aColumn) {
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item)
@ -320,10 +320,10 @@ var gCookiesWindow = {
_selection: null,
get selection () { return this._selection; },
set selection (val) { this._selection = val; return val; },
getRowProperties: function (aIndex) { return ""; },
getCellProperties: function (aIndex, aColumn) { return ""; },
getColumnProperties: function (aColumn) { return ""; },
isContainer: function (aIndex) {
getRowProperties: function(aIndex) { return ""; },
getCellProperties: function(aIndex, aColumn) { return ""; },
getColumnProperties: function(aColumn) { return ""; },
isContainer: function(aIndex) {
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return false;
@ -331,7 +331,7 @@ var gCookiesWindow = {
}
return false;
},
isContainerOpen: function (aIndex) {
isContainerOpen: function(aIndex) {
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return false;
@ -339,7 +339,7 @@ var gCookiesWindow = {
}
return false;
},
isContainerEmpty: function (aIndex) {
isContainerEmpty: function(aIndex) {
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return false;
@ -347,11 +347,11 @@ var gCookiesWindow = {
}
return false;
},
isSeparator: function (aIndex) { return false; },
isSorted: function (aIndex) { return false; },
canDrop: function (aIndex, aOrientation) { return false; },
drop: function (aIndex, aOrientation) {},
getParentIndex: function (aIndex) {
isSeparator: function(aIndex) { return false; },
isSorted: function(aIndex) { return false; },
canDrop: function(aIndex, aOrientation) { return false; },
drop: function(aIndex, aOrientation) {},
getParentIndex: function(aIndex) {
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
// If an item has no parent index (i.e. it is at the top level) this
@ -363,7 +363,7 @@ var gCookiesWindow = {
}
return -1;
},
hasNextSibling: function (aParentIndex, aIndex) {
hasNextSibling: function(aParentIndex, aIndex) {
if (!this._filtered) {
// |aParentIndex| appears to be bogus, but we can get the real
// parent index by getting the entry for |aIndex| and reading the
@ -390,7 +390,7 @@ var gCookiesWindow = {
}
return aIndex < this.rowCount - 1;
},
hasPreviousSibling: function (aIndex) {
hasPreviousSibling: function(aIndex) {
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return false;
@ -400,7 +400,7 @@ var gCookiesWindow = {
}
return aIndex > 0;
},
getLevel: function (aIndex) {
getLevel: function(aIndex) {
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return 0;
@ -408,11 +408,11 @@ var gCookiesWindow = {
}
return 0;
},
getImageSrc: function (aIndex, aColumn) {},
getProgressMode: function (aIndex, aColumn) {},
getCellValue: function (aIndex, aColumn) {},
setTree: function (aTree) {},
toggleOpenState: function (aIndex) {
getImageSrc: function(aIndex, aColumn) {},
getProgressMode: function(aIndex, aColumn) {},
getCellValue: function(aIndex, aColumn) {},
setTree: function(aTree) {},
toggleOpenState: function(aIndex) {
if (!this._filtered) {
var item = this._getItemAtIndex(aIndex);
if (!item) return;
@ -425,28 +425,28 @@ var gCookiesWindow = {
gCookiesWindow._tree.treeBoxObject.invalidateRow(aIndex);
}
},
cycleHeader: function (aColumn) {},
selectionChanged: function () {},
cycleCell: function (aIndex, aColumn) {},
isEditable: function (aIndex, aColumn) {
cycleHeader: function(aColumn) {},
selectionChanged: function() {},
cycleCell: function(aIndex, aColumn) {},
isEditable: function(aIndex, aColumn) {
return false;
},
isSelectable: function (aIndex, aColumn) {
isSelectable: function(aIndex, aColumn) {
return false;
},
setCellValue: function (aIndex, aColumn, aValue) {},
setCellText: function (aIndex, aColumn, aValue) {},
performAction: function (aAction) {},
performActionOnRow: function (aAction, aIndex) {},
performActionOnCell: function (aAction, aindex, aColumn) {}
setCellValue: function(aIndex, aColumn, aValue) {},
setCellText: function(aIndex, aColumn, aValue) {},
performAction: function(aAction) {},
performActionOnRow: function(aAction, aIndex) {},
performActionOnCell: function(aAction, aindex, aColumn) {}
},
_makeStrippedHost: function (aHost) {
_makeStrippedHost: function(aHost) {
var formattedHost = aHost.charAt(0) == "." ? aHost.substring(1, aHost.length) : aHost;
return formattedHost.substring(0, 4) == "www." ? formattedHost.substring(4, formattedHost.length) : formattedHost;
},
_addCookie: function (aStrippedHost, aCookie, aHostCount) {
_addCookie: function(aStrippedHost, aCookie, aHostCount) {
if (!(aStrippedHost in this._hosts) || !this._hosts[aStrippedHost]) {
this._hosts[aStrippedHost] = { cookies : [],
rawHost : aStrippedHost,
@ -461,7 +461,7 @@ var gCookiesWindow = {
this._hosts[aStrippedHost].cookies.push(c);
},
_makeCookieObject: function (aStrippedHost, aCookie) {
_makeCookieObject: function(aStrippedHost, aCookie) {
var host = aCookie.host;
var formattedHost = host.charAt(0) == "." ? host.substring(1, host.length) : host;
var c = { name : aCookie.name,
@ -478,7 +478,7 @@ var gCookiesWindow = {
return c;
},
_loadCookies: function () {
_loadCookies: function() {
var e = this._cm.enumerator;
var hostCount = { value: 0 };
this._hosts = {};
@ -495,7 +495,7 @@ var gCookiesWindow = {
this._view._rowCount = hostCount.value;
},
formatExpiresString: function (aExpires) {
formatExpiresString: function(aExpires) {
if (aExpires) {
var date = new Date(1000 * aExpires);
return this._ds.FormatDateTime("", this._ds.dateFormatLong,
@ -510,7 +510,7 @@ var gCookiesWindow = {
return this._bundle.getString("expireAtEndOfSession");
},
_updateCookieData: function (aItem) {
_updateCookieData: function(aItem) {
var seln = this._view.selection;
var ids = ["name", "value", "host", "path", "isSecure", "expires"];
var properties;
@ -537,7 +537,7 @@ var gCookiesWindow = {
document.getElementById(property).value = properties[property];
},
onCookieSelected: function () {
onCookieSelected: function() {
var properties, item;
var seln = this._tree.view.selection;
var hasRows = this._tree.view.rowCount > 0;
@ -575,7 +575,7 @@ var gCookiesWindow = {
removeSelectedCookies.disabled = !hasRows || !hasSelection;
},
performDeletion: function (deleteItems) {
performDeletion: function(deleteItems) {
var psvc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var blockFutureCookies = false;
@ -588,7 +588,7 @@ var gCookiesWindow = {
}
},
deleteCookie: function () {
deleteCookie: function() {
// Selection Notes
// - Selection always moves to *NEXT* adjacent item unless item
// is last child at a given level in which case it moves to *PREVIOUS*
@ -714,7 +714,7 @@ var gCookiesWindow = {
}
},
deleteAllCookies: function () {
deleteAllCookies: function() {
if (this._view._filtered) {
var rowCount = this._view.rowCount;
var deleteItems = [];
@ -733,7 +733,7 @@ var gCookiesWindow = {
this.focusFilterBox();
},
onCookieKeyPress: function (aEvent) {
onCookieKeyPress: function(aEvent) {
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE
#ifdef XP_MACOSX
|| aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE
@ -745,7 +745,7 @@ var gCookiesWindow = {
_lastSortProperty : "",
_lastSortAscending: false,
sort: function (aProperty) {
sort: function(aProperty) {
var ascending = (aProperty == this._lastSortProperty) ? !this._lastSortAscending : true;
// Sort the Non-Filtered Host Collections
if (aProperty == "rawHost") {
@ -798,7 +798,7 @@ var gCookiesWindow = {
this._lastSortProperty = aProperty;
},
clearFilter: function () {
clearFilter: function() {
// Revert to single-select in the tree
this._tree.setAttribute("seltype", "single");
@ -840,13 +840,13 @@ var gCookiesWindow = {
this._updateRemoveAllButton();
},
_cookieMatchesFilter: function (aCookie) {
_cookieMatchesFilter: function(aCookie) {
return aCookie.rawHost.indexOf(this._view._filterValue) != -1 ||
aCookie.name.indexOf(this._view._filterValue) != -1 ||
aCookie.value.indexOf(this._view._filterValue) != -1;
},
_filterCookies: function (aFilterValue) {
_filterCookies: function(aFilterValue) {
this._view._filterValue = aFilterValue;
var cookies = [];
for (var i = 0; i < gCookiesWindow._hostOrder.length; ++i) { //var host in gCookiesWindow._hosts) {
@ -863,7 +863,7 @@ var gCookiesWindow = {
_lastSelectedRanges: [],
_openIndices: [],
_saveState: function () {
_saveState: function() {
// Save selection
var seln = this._view.selection;
this._lastSelectedRanges = [];
@ -883,7 +883,7 @@ var gCookiesWindow = {
}
},
_updateRemoveAllButton: function () {
_updateRemoveAllButton: function() {
let removeAllCookies = document.getElementById("removeAllCookies");
removeAllCookies.disabled = this._view._rowCount == 0;
@ -897,7 +897,7 @@ var gCookiesWindow = {
removeAllCookies.setAttribute("accesskey", this._bundle.getString(accessKeyStringID));
},
filter: function () {
filter: function() {
var filter = document.getElementById("filter").value;
if (filter == "") {
gCookiesWindow.clearFilter();
@ -930,18 +930,18 @@ var gCookiesWindow = {
this._updateRemoveAllButton();
},
setFilter: function (aFilterString) {
setFilter: function(aFilterString) {
document.getElementById("filter").value = aFilterString;
this.filter();
},
focusFilterBox: function () {
focusFilterBox: function() {
var filter = document.getElementById("filter");
filter.focus();
filter.select();
},
onWindowKeyPress: function (aEvent) {
onWindowKeyPress: function(aEvent) {
if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
window.close();
}

View file

@ -22,7 +22,7 @@ var gPrivacyPane = {
* label of the "Clear Now..." button.
* Also restores the previously selected tab or tab index passed as argument.
*/
init: function ()
init: function()
{
this._inited = true;
var privacyPrefs = document.getElementById("privacyPrefs");
@ -47,7 +47,7 @@ var gPrivacyPane = {
* Stores the identity of the current tab in preferences so that the selected
* tab can be persisted between openings of the preferences window.
*/
tabSelectionChanged: function ()
tabSelectionChanged: function()
{
if (!this._inited)
return;
@ -112,10 +112,10 @@ var gPrivacyPane = {
/**
* Initialize the history mode menulist based on the privacy preferences
*/
initializeHistoryMode: function ()
initializeHistoryMode: function()
{
let mode;
let getVal = function (aPref)
let getVal = function(aPref)
document.getElementById(aPref).value;
if (this._checkDefaultValues(this.prefsForDefault)) {
@ -133,7 +133,7 @@ var gPrivacyPane = {
/**
* Update the selected pane based on the history mode menulist
*/
updateHistoryModePane: function ()
updateHistoryModePane: function()
{
let selectedIndex = -1;
switch (document.getElementById("historyMode").value) {
@ -154,7 +154,7 @@ var gPrivacyPane = {
* Update the private browsing auto-start pref and the history mode
* micro-management prefs based on the history mode menulist
*/
updateHistoryModePrefs: function ()
updateHistoryModePrefs: function()
{
let pref = document.getElementById("browser.privatebrowsing.autostart");
switch (document.getElementById("historyMode").value) {
@ -187,13 +187,13 @@ var gPrivacyPane = {
* Update the privacy micro-management controls based on the
* value of the private browsing auto-start checkbox.
*/
updatePrivacyMicroControls: function ()
updatePrivacyMicroControls: function()
{
if (document.getElementById("historyMode").value == "custom") {
let disabled = this._autoStartPrivateBrowsing =
document.getElementById("privateBrowsingAutoStart").checked;
this.dependentControls
.forEach(function (aElement)
.forEach(function(aElement)
document.getElementById(aElement).disabled = disabled);
const Ci = Components.interfaces;
@ -229,7 +229,7 @@ var gPrivacyPane = {
/**
* Initialize the starting state for the auto-start private browsing mode pref reverter.
*/
initAutoStartPrivateBrowsingReverter: function ()
initAutoStartPrivateBrowsingReverter: function()
{
let mode = document.getElementById("historyMode");
let autoStart = document.getElementById("privateBrowsingAutoStart");
@ -239,7 +239,7 @@ var gPrivacyPane = {
_lastMode: null,
_lasCheckState: null,
updateAutostart: function () {
updateAutostart: function() {
let mode = document.getElementById("historyMode");
let autoStart = document.getElementById("privateBrowsingAutoStart");
let pref = document.getElementById("browser.privatebrowsing.autostart");
@ -331,7 +331,7 @@ var gPrivacyPane = {
* enables/disables the rest of the cookie UI accordingly, returning true
* if cookies are enabled.
*/
readAcceptCookies: function ()
readAcceptCookies: function()
{
var pref = document.getElementById("network.cookie.cookieBehavior");
var acceptThirdPartyLabel = document.getElementById("acceptThirdPartyLabel");
@ -352,7 +352,7 @@ var gPrivacyPane = {
* Enables/disables the "keep until" label and menulist in response to the
* "accept cookies" checkbox being checked or unchecked.
*/
writeAcceptCookies: function ()
writeAcceptCookies: function()
{
var accept = document.getElementById("acceptCookies");
var acceptThirdPartyMenu = document.getElementById("acceptThirdPartyMenu");
@ -367,7 +367,7 @@ var gPrivacyPane = {
/**
* Converts between network.cookie.cookieBehavior and the third-party cookie UI
*/
readAcceptThirdPartyCookies: function ()
readAcceptThirdPartyCookies: function()
{
var pref = document.getElementById("network.cookie.cookieBehavior");
switch (pref.value)
@ -385,7 +385,7 @@ var gPrivacyPane = {
}
},
writeAcceptThirdPartyCookies: function ()
writeAcceptThirdPartyCookies: function()
{
var accept = document.getElementById("acceptThirdPartyMenu").selectedItem;
switch (accept.value)
@ -404,7 +404,7 @@ var gPrivacyPane = {
/**
* Displays fine-grained, per-site preferences for cookies.
*/
showCookieExceptions: function ()
showCookieExceptions: function()
{
var bundlePreferences = document.getElementById("bundlePreferences");
var params = { blockVisible : true,
@ -422,7 +422,7 @@ var gPrivacyPane = {
/**
* Displays all the user's cookies in a dialog.
*/
showCookies: function (aCategory)
showCookies: function(aCategory)
{
document.documentElement.openWindow("Browser:Cookies",
"chrome://browser/content/preferences/cookies.xul",
@ -442,7 +442,7 @@ var gPrivacyPane = {
/**
* Displays the Clear Private Data settings dialog.
*/
showClearPrivateDataSettings: function ()
showClearPrivateDataSettings: function()
{
document.documentElement.openSubDialog("chrome://browser/content/preferences/sanitize.xul",
"", null);
@ -453,7 +453,7 @@ var gPrivacyPane = {
* Displays a dialog from which individual parts of private data may be
* cleared.
*/
clearPrivateDataNow: function (aClearEverything)
clearPrivateDataNow: function(aClearEverything)
{
var ts = document.getElementById("privacy.sanitize.timeSpan");
var timeSpanOrig = ts.value;
@ -475,7 +475,7 @@ var gPrivacyPane = {
* Enables or disables the "Settings..." button depending
* on the privacy.sanitize.sanitizeOnShutdown preference value
*/
_updateSanitizeSettingsButton: function () {
_updateSanitizeSettingsButton: function() {
var settingsButton = document.getElementById("clearDataSettings");
var sanitizeOnShutdownPref = document.getElementById("privacy.sanitize.sanitizeOnShutdown");

View file

@ -15,7 +15,7 @@
* closes.
*/
var SelectBookmarkDialog = {
init: function () {
init: function() {
document.getElementById("bookmarks").place =
"place:queryType=1&folder=" + PlacesUIUtils.allBookmarksFolderId;
@ -27,7 +27,7 @@ var SelectBookmarkDialog = {
* Update the disabled state of the OK button as the user changes the
* selection within the view.
*/
selectionChanged: function () {
selectionChanged: function() {
var accept = document.documentElement.getButton("accept");
var bookmarks = document.getElementById("bookmarks");
var disableAcceptButton = true;
@ -38,7 +38,7 @@ var SelectBookmarkDialog = {
accept.disabled = disableAcceptButton;
},
onItemDblClick: function () {
onItemDblClick: function() {
var bookmarks = document.getElementById("bookmarks");
var selectedNode = bookmarks.selectedNode;
if (selectedNode && PlacesUtils.nodeIsURI(selectedNode)) {
@ -54,7 +54,7 @@ var SelectBookmarkDialog = {
* User accepts their selection. Set all the selected URLs or the contents
* of the selected folder as the list of homepages.
*/
accept: function () {
accept: function() {
var bookmarks = document.getElementById("bookmarks");
NS_ASSERT(bookmarks.hasSelection,
"Should not be able to accept dialog if there is no selected URL!");