mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
autofill script fixes
This commit is contained in:
@@ -35,10 +35,13 @@
|
||||
2. Remove isChrome and isSafari since they are not used.
|
||||
3. Unminify and format to meet Mozilla review requirements.
|
||||
4. Remove unnecessary input types from getFormElements query selector and limit number of elements returned.
|
||||
5. Remove fakeTested prop.
|
||||
*/
|
||||
|
||||
function collect(document, undefined) {
|
||||
// START MODIFICATION
|
||||
var isFirefox = navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Gecko/') !== -1;
|
||||
// END MODIFICATION
|
||||
|
||||
document.elementsByOPID = {};
|
||||
document.addEventListener('input', function (canuf) {
|
||||
@@ -309,7 +312,9 @@
|
||||
field.form = getElementAttrValue(el.form, 'opid');
|
||||
}
|
||||
|
||||
addProp(field, 'fakeTested', checkIfFakeTested(field, el), false);
|
||||
// START MODIFICATION
|
||||
//addProp(field, 'fakeTested', checkIfFakeTested(field, el), false);
|
||||
// END MODIFICATION
|
||||
|
||||
return field;
|
||||
});
|
||||
@@ -549,6 +554,7 @@
|
||||
|
||||
// get all the form elements that we care about
|
||||
function getFormElements(theDoc, limit) {
|
||||
// START MODIFICATION
|
||||
var els = [];
|
||||
try {
|
||||
var elsList = theDoc.querySelectorAll('input:not([type="hidden"]):not([type="submit"]):not([type="reset"])' +
|
||||
@@ -557,6 +563,7 @@
|
||||
} catch (e) { }
|
||||
|
||||
return limit && els.length > limit ? els.slice(0, limit) : els;
|
||||
// END MODIFICATION
|
||||
}
|
||||
|
||||
// focus the element and optionally restore its original value
|
||||
|
||||
Reference in New Issue
Block a user