From 5c9618b0a8f908647aed3603e3879ea3b773de7e Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 13 Apr 2018 22:42:32 -0400 Subject: [PATCH] rename agilebits stuff to bitwarden --- src/content/autofill.css | 22 +++++++++++----------- src/content/autofill.js | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/content/autofill.css b/src/content/autofill.css index b0edf0318c..e32a6f278e 100644 --- a/src/content/autofill.css +++ b/src/content/autofill.css @@ -1,32 +1,32 @@ -@-webkit-keyframes onepasswordfill { +@-webkit-keyframes bitwardenfill { 0% { - -webkit-transform: scale(1.0,1.0); + -webkit-transform: scale(1.0, 1.0); } 50% { - -webkit-transform: scale(1.2,1.2); + -webkit-transform: scale(1.2, 1.2); } 100% { - -webkit-transform: scale(1.0,1.0); + -webkit-transform: scale(1.0, 1.0); } } -@-moz-keyframes onepasswordfill { +@-moz-keyframes bitwardenfill { 0% { - transform: scale(1.0,1.0); + transform: scale(1.0, 1.0); } 50% { - transform: scale(1.2,1.2); + transform: scale(1.2, 1.2); } 100% { - transform: scale(1.0,1.0); + transform: scale(1.0, 1.0); } } -.com-agilebits-onepassword-extension-animated-fill { - animation: onepasswordfill 200ms ease-in-out 0ms 1; - -webkit-animation: onepasswordfill 200ms ease-in-out 0ms 1; +.com-bitwarden-browser-animated-fill { + animation: bitwardenfill 200ms ease-in-out 0ms 1; + -webkit-animation: bitwardenfill 200ms ease-in-out 0ms 1; } diff --git a/src/content/autofill.js b/src/content/autofill.js index f38715c857..596070ca57 100644 --- a/src/content/autofill.js +++ b/src/content/autofill.js @@ -36,6 +36,7 @@ 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. + 6. Rename com.agilebits.* stuff to com.bitwarden.* */ function collect(document, undefined) { @@ -44,8 +45,10 @@ // END MODIFICATION document.elementsByOPID = {}; - document.addEventListener('input', function (canuf) { - false !== canuf.a && 'input' === canuf.target.tagName.toLowerCase() && (canuf.target.dataset['com.agilebits.onepassword.userEdited'] = 'yes'); + document.addEventListener('input', function (inputevent) { + inputevent.a !== false && + inputevent.target.tagName.toLowerCase() === 'input' && + (inputevent.target.dataset['com.bitwarden.browser.userEdited'] = 'yes'); }, true); function getPageDetails(theDoc, oneShotId) { @@ -264,7 +267,9 @@ addProp(field, 'htmlClass', getElementAttrValue(el, 'class')); addProp(field, 'tabindex', getElementAttrValue(el, 'tabindex')); addProp(field, 'title', getElementAttrValue(el, 'title')); - addProp(field, 'userEdited', !!el.dataset['com.agilebits.onepassword.userEdited']); + // START MODIFICATION + addProp(field, 'userEdited', !!el.dataset['com.browser.browser.userEdited']); + // END MODIFICATION if ('hidden' != toLowerString(el.type)) { addProp(field, 'label-tag', getLabelTag(el)); @@ -823,9 +828,11 @@ setValueForElement(el); afterValSetFunc(el); setValueForElementByEvent(el); - canSeeElementToStyle(el) && (el.className += ' com-agilebits-onepassword-extension-animated-fill', + canSeeElementToStyle(el) && (el.className += ' com-bitwarden-browser-animated-fill', setTimeout(function () { - el && el.className && (el.className = el.className.replace(/(\\s)?com-agilebits-onepassword-extension-animated-fill/, '')); + // START MODIFICATION + el && el.className && (el.className = el.className.replace(/(\\s)?com-bitwarden-browser-animated-fill/, '')); + // END MODIFICATION }, styleTimeout)); }