summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2020-03-06 10:43:20 -0600
committerathenian200 <athenian200@outlook.com>2020-03-06 10:43:20 -0600
commit557de955a355fb93784b29244cef3f47f378df09 (patch)
tree52fe914016418d3b25b5a5fd417741e301f3abd8
parent4df7e5e87cdd669423e44c665a11a7d98929dcdc (diff)
downloadbasilisk-557de955a355fb93784b29244cef3f47f378df09.tar.gz
Issue MoonchildProductions/UXP#516 - Remove named function syntax from basilisk/components/preferences.
-rw-r--r--basilisk/components/preferences/applicationManager.js10
-rw-r--r--basilisk/components/preferences/cookies.js4
-rw-r--r--basilisk/components/preferences/in-content/privacy.js12
-rw-r--r--basilisk/components/preferences/in-content/search.js20
-rw-r--r--basilisk/components/preferences/selectBookmark.js8
5 files changed, 27 insertions, 27 deletions
diff --git a/basilisk/components/preferences/applicationManager.js b/basilisk/components/preferences/applicationManager.js
index 2e0f47a..997c357 100644
--- a/basilisk/components/preferences/applicationManager.js
+++ b/basilisk/components/preferences/applicationManager.js
@@ -10,7 +10,7 @@ var Ci = Components.interfaces;
var gAppManagerDialog = {
_removed: [],
- init: function appManager_init() {
+ init: function() {
this.handlerInfo = window.arguments[0];
var bundle = document.getElementById("appManagerBundle");
@@ -44,7 +44,7 @@ var gAppManagerDialog = {
list.selectedIndex = 0;
},
- onOK: function appManager_onOK() {
+ 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 appManager_onCancel() {
+ onCancel: function() {
// do nothing
},
- remove: function appManager_remove() {
+ 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 appManager_onSelect() {
+ onSelect: function() {
var list = document.getElementById("appList");
if (!list.selectedItem) {
document.getElementById("remove").disabled = true;
diff --git a/basilisk/components/preferences/cookies.js b/basilisk/components/preferences/cookies.js
index 4ede5b6..d44e9ee 100644
--- a/basilisk/components/preferences/cookies.js
+++ b/basilisk/components/preferences/cookies.js
@@ -564,7 +564,7 @@ var gCookiesWindow = {
removeSelectedCookies.disabled = !hasRows || !hasSelection;
},
- performDeletion: function gCookiesWindow_performDeletion(deleteItems) {
+ performDeletion: function(deleteItems) {
var psvc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var blockFutureCookies = false;
@@ -869,7 +869,7 @@ var gCookiesWindow = {
}
},
- _updateRemoveAllButton: function gCookiesWindow__updateRemoveAllButton() {
+ _updateRemoveAllButton: function() {
let removeAllCookies = document.getElementById("removeAllCookies");
removeAllCookies.disabled = this._view._rowCount == 0;
diff --git a/basilisk/components/preferences/in-content/privacy.js b/basilisk/components/preferences/in-content/privacy.js
index a976fb4..0774ecc 100644
--- a/basilisk/components/preferences/in-content/privacy.js
+++ b/basilisk/components/preferences/in-content/privacy.js
@@ -232,7 +232,7 @@ var gPrivacyPane = {
/**
* Initialize the history mode menulist based on the privacy preferences
*/
- initializeHistoryMode: function PPP_initializeHistoryMode()
+ initializeHistoryMode: function()
{
let mode;
let getVal = aPref => document.getElementById(aPref).value;
@@ -252,7 +252,7 @@ var gPrivacyPane = {
/**
* Update the selected pane based on the history mode menulist
*/
- updateHistoryModePane: function PPP_updateHistoryModePane()
+ updateHistoryModePane: function()
{
let selectedIndex = -1;
switch (document.getElementById("historyMode").value) {
@@ -273,7 +273,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 PPP_updateHistoryModePrefs()
+ updateHistoryModePrefs: function()
{
let pref = document.getElementById("browser.privatebrowsing.autostart");
switch (document.getElementById("historyMode").value) {
@@ -308,7 +308,7 @@ var gPrivacyPane = {
* Update the privacy micro-management controls based on the
* value of the private browsing auto-start checkbox.
*/
- updatePrivacyMicroControls: function PPP_updatePrivacyMicroControls()
+ updatePrivacyMicroControls: function()
{
if (document.getElementById("historyMode").value == "custom") {
let disabled = this._autoStartPrivateBrowsing =
@@ -360,7 +360,7 @@ var gPrivacyPane = {
/**
* Initialize the starting state for the auto-start private browsing mode pref reverter.
*/
- initAutoStartPrivateBrowsingReverter: function PPP_initAutoStartPrivateBrowsingReverter()
+ initAutoStartPrivateBrowsingReverter: function()
{
let mode = document.getElementById("historyMode");
let autoStart = document.getElementById("privateBrowsingAutoStart");
@@ -370,7 +370,7 @@ var gPrivacyPane = {
_lastMode: null,
_lastCheckState: null,
- updateAutostart: function PPP_updateAutostart() {
+ updateAutostart: function() {
let mode = document.getElementById("historyMode");
let autoStart = document.getElementById("privateBrowsingAutoStart");
let pref = document.getElementById("browser.privatebrowsing.autostart");
diff --git a/basilisk/components/preferences/in-content/search.js b/basilisk/components/preferences/in-content/search.js
index 55aa2c1..badd366 100644
--- a/basilisk/components/preferences/in-content/search.js
+++ b/basilisk/components/preferences/in-content/search.js
@@ -345,15 +345,15 @@ EngineStore.prototype = {
return val;
},
- _getIndexForEngine: function ES_getIndexForEngine(aEngine) {
+ _getIndexForEngine: function(aEngine) {
return this._engines.indexOf(aEngine);
},
- _getEngineByName: function ES_getEngineByName(aName) {
+ _getEngineByName: function(aName) {
return this._engines.find(engine => engine.name == aName);
},
- _cloneEngine: function ES_cloneEngine(aEngine) {
+ _cloneEngine: function(aEngine) {
var clonedObj={};
for (var i in aEngine)
clonedObj[i] = aEngine[i];
@@ -363,15 +363,15 @@ EngineStore.prototype = {
},
// Callback for Array's some(). A thisObj must be passed to some()
- _isSameEngine: function ES_isSameEngine(aEngineClone) {
+ _isSameEngine: function(aEngineClone) {
return aEngineClone.originalEngine == this.originalEngine;
},
- addEngine: function ES_addEngine(aEngine) {
+ addEngine: function(aEngine) {
this._engines.push(this._cloneEngine(aEngine));
},
- moveEngine: function ES_moveEngine(aEngine, aNewIndex) {
+ moveEngine: function(aEngine, aNewIndex) {
if (aNewIndex < 0 || aNewIndex > this._engines.length - 1)
throw new Error("ES_moveEngine: invalid aNewIndex!");
var index = this._getIndexForEngine(aEngine);
@@ -388,7 +388,7 @@ EngineStore.prototype = {
Services.search.moveEngine(aEngine.originalEngine, aNewIndex);
},
- removeEngine: function ES_removeEngine(aEngine) {
+ removeEngine: function(aEngine) {
if (this._engines.length == 1) {
throw new Error("Cannot remove last engine!");
}
@@ -407,7 +407,7 @@ EngineStore.prototype = {
return index;
},
- restoreDefaultEngines: function ES_restoreDefaultEngines() {
+ restoreDefaultEngines: function() {
var added = 0;
for (var i = 0; i < this._defaultEngines.length; ++i) {
@@ -436,7 +436,7 @@ EngineStore.prototype = {
return added;
},
- changeEngine: function ES_changeEngine(aEngine, aProp, aNewValue) {
+ changeEngine: function(aEngine, aProp, aNewValue) {
var index = this._getIndexForEngine(aEngine);
if (index == -1)
throw new Error("invalid engine?");
@@ -445,7 +445,7 @@ EngineStore.prototype = {
aEngine.originalEngine[aProp] = aNewValue;
},
- reloadIcons: function ES_reloadIcons() {
+ reloadIcons: function() {
this._engines.forEach(function (e) {
e.uri = e.originalEngine.uri;
});
diff --git a/basilisk/components/preferences/selectBookmark.js b/basilisk/components/preferences/selectBookmark.js
index ae9b6b1..5d03c4b 100644
--- a/basilisk/components/preferences/selectBookmark.js
+++ b/basilisk/components/preferences/selectBookmark.js
@@ -15,7 +15,7 @@
* closes.
*/
var SelectBookmarkDialog = {
- init: function SBD_init() {
+ 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 SBD_selectionChanged() {
+ 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 SBD_onItemDblClick() {
+ 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 SBD_accept() {
+ accept: function() {
var bookmarks = document.getElementById("bookmarks");
NS_ASSERT(bookmarks.hasSelection,
"Should not be able to accept dialog if there is no selected URL!");