diff --git a/src/content/autofill.js b/src/content/autofill.js index 878a9ca2..841eaefd 100644 --- a/src/content/autofill.js +++ b/src/content/autofill.js @@ -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 diff --git a/src/content/notificationBar.js b/src/content/notificationBar.js index 29b62291..d07b286b 100644 --- a/src/content/notificationBar.js +++ b/src/content/notificationBar.js @@ -6,6 +6,7 @@ observer = null, domObservationCollectTimeout = null, collectIfNeededTimeout = null, + observeDomTimeout = null, iframed = isIframed(), submitButtonNames = ['log in', 'sign in', 'login', 'go', 'submit', 'continue', 'next']; @@ -130,7 +131,11 @@ } collect(); - observeDom(); + + if (observeDomTimeout) { + clearTimeout(observeDomTimeout); + } + observeDomTimeout = setTimeout(observeDom, 1000); } if (collectIfNeededTimeout) {