mirror of
https://github.com/NohamR/safari-internal-js.git
synced 2026-02-22 02:45:41 +00:00
Add 26.2 versioned JS files and move 15.7 files
This commit is contained in:
30
26.2/js/forms/AutomaticPasswords.js
Normal file
30
26.2/js/forms/AutomaticPasswords.js
Normal file
@@ -0,0 +1,30 @@
|
||||
//# sourceURL=__InjectedScript_AutomaticPasswords.js
|
||||
/* Copyright (c) 2025 Apple Inc. All rights reserved. */
|
||||
"use strict";
|
||||
class AutomaticPasswords {
|
||||
removeAutomaticPasswordElements(t, e, o) {
|
||||
for (let e of t)
|
||||
FormMetadataJS.removeAutomaticStrongPasswordFromPasswordElement(e);
|
||||
if (!o) return;
|
||||
let r = document.activeElement,
|
||||
a = e ? FormMetadataJS.formControlWithUniqueID(e) : null;
|
||||
(a && a.blur(), a && a === r && a.focus());
|
||||
}
|
||||
blurControlWithID(t) {
|
||||
let e = t ? FormMetadataJS.formControlWithUniqueID(t) : null;
|
||||
e && e.blur();
|
||||
}
|
||||
setStrongPasswordElementViewableIfAppropriate(t, e) {
|
||||
for (let o of t) {
|
||||
let t = FormMetadataJS.formControlWithUniqueID(o);
|
||||
if (!t) return;
|
||||
if ("text" === t.type)
|
||||
return (
|
||||
FormMetadataJSController.setInputElementAutoFilledAndViewable(t, !1),
|
||||
void FormMetadataJSController.setInputElementAutofilled(t, !1)
|
||||
);
|
||||
FormMetadataJSController.setInputElementAutoFilledAndViewable(t, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
var AutomaticPasswordsJS = new AutomaticPasswords();
|
||||
Reference in New Issue
Block a user