[Pkg-mozext-commits] [autofill-forms] 03/13: fixing #2
David Prévot
taffit at moszumanska.debian.org
Thu Oct 29 20:57:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository autofill-forms.
commit 69b0431270f46ba1abdce05f3b8702d45d5fecb2
Author: Sarah Avilov <sarah.avilov at gmail.com>
Date: Sun Jul 12 12:46:02 2015 +0430
fixing #2
---
aff.xpi | Bin 152468 -> 152537 bytes
chrome/content/inject.js | 8 ++++++++
2 files changed, 8 insertions(+)
diff --git a/aff.xpi b/aff.xpi
index d476ab2..0692053 100644
Binary files a/aff.xpi and b/aff.xpi differ
diff --git a/chrome/content/inject.js b/chrome/content/inject.js
index 414a1b6..f25b733 100644
--- a/chrome/content/inject.js
+++ b/chrome/content/inject.js
@@ -1,6 +1,12 @@
/* globals addMessageListener, content */
'use strict';
+function onchange (elem) {
+ var evt = content.document.createEvent('HTMLEvents');
+ evt.initEvent('change', true, true);
+ elem.dispatchEvent(evt);
+}
+
addMessageListener('click', function () {
var elems = content.document.querySelectorAll('[data-aff-click=true]');
[].forEach.call(elems, function (elem) {
@@ -20,6 +26,7 @@ addMessageListener('focus', function () {
[].forEach.call(elems, function (elem) {
elem.removeAttribute('data-aff-focus');
elem.focus();
+ onchange(elem);
});
});
addMessageListener('value', function () {
@@ -27,6 +34,7 @@ addMessageListener('value', function () {
[].forEach.call(elems, function (elem) {
elem.value = elem.dataset.affValue;
elem.removeAttribute('data-aff-value');
+ onchange(elem);
});
});
addMessageListener('selectionEnd', function () {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/autofill-forms.git
More information about the Pkg-mozext-commits
mailing list