Bug 1251916 - Use standard JavaScript features in toolkit/components/passwordmgr to pass eslint checks: general, simple changes. r=MattN
MozReview-Commit-ID: IdecwypP6on
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
/*** =================== SAVED SIGNONS CODE =================== ***/
|
||||
|
||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
var kSignonBundle;
|
||||
var showingPasswords = false;
|
||||
var dateFormatter = new Intl.DateTimeFormat(undefined,
|
||||
@@ -243,11 +245,10 @@ function HandleSignonKeyPress(e) {
|
||||
if (signonsTree.getAttribute("editing")) {
|
||||
return;
|
||||
}
|
||||
if (e.keyCode == KeyEvent.DOM_VK_DELETE
|
||||
#ifdef XP_MACOSX
|
||||
|| e.keyCode == KeyEvent.DOM_VK_BACK_SPACE
|
||||
#endif
|
||||
) {
|
||||
if (e.keyCode == KeyEvent.DOM_VK_DELETE ||
|
||||
(AppConstants.platform == "macosx" &&
|
||||
e.keyCode == KeyEvent.DOM_VK_BACK_SPACE))
|
||||
{
|
||||
DeleteSignon();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ function DeleteAllFromTree(tree, view, table, deletedTable, removeButton, remove
|
||||
table.length = 0;
|
||||
|
||||
// clear out selections
|
||||
view.selection.select(-1);
|
||||
view.selection.select(-1);
|
||||
|
||||
// update the tree view and notify the tree
|
||||
view.rowCount = 0;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
/*** =================== REJECTED SIGNONS CODE =================== ***/
|
||||
|
||||
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
function RejectsStartup() {
|
||||
LoadRejects();
|
||||
|
||||
@@ -89,11 +91,10 @@ function FinalizeRejectDeletions() {
|
||||
}
|
||||
|
||||
function HandleRejectKeyPress(e) {
|
||||
if (e.keyCode == KeyEvent.DOM_VK_DELETE
|
||||
#ifdef XP_MACOSX
|
||||
|| e.keyCode == KeyEvent.DOM_VK_BACK_SPACE
|
||||
#endif
|
||||
) {
|
||||
if (e.keyCode == KeyEvent.DOM_VK_DELETE ||
|
||||
(AppConstants.platform == "macosx" &&
|
||||
e.keyCode == KeyEvent.DOM_VK_BACK_SPACE))
|
||||
{
|
||||
DeleteReject();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user