~sircmpwn/himitsu-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH himitsu-firefox] Enable autofilling select elements

Details
Message ID
<20220726222522.6794-1-krystian@krystianch.com>
DKIM signature
missing
Download raw message
Patch: +7 -2
Some login forms require selecting a domain in addition to providing
username and password. An example would be the OpenStack login form.
---
 content/content.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/content/content.js b/content/content.js
index b26609f..dbb847d 100644
--- a/content/content.js
+++ b/content/content.js
@@ -5,6 +5,11 @@ browser.runtime.onMessage.addListener(msg => {
	};
});

function findElement(form, name) {
	const selector = `input[name="${name}"],select[name="${name}"]`;
	return form.querySelector(selector);
}

function handleAutofill(msg) {
	const form = findForm(msg.key);
	if (form === null) {
@@ -15,7 +20,7 @@ function handleAutofill(msg) {
		if (pair.key === "proto" || pair.key === "host") {
			return;
		};
		const input = form.querySelector(`input[name="${pair.key}"]`);
		const input = findElement(form, pair.key);
		input.value = pair.value;
	});
}
@@ -32,7 +37,7 @@ function findForm(key) {
			if (pair.optional) {
				return;
			}
			const input = form.querySelector(`input[name="${pair.key}"]`);
			const input = findElement(form, pair.key);
			if (input === null) {
				valid = false;
			}
-- 
2.36.2

[himitsu-firefox/patches/.build.yml] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CLPXVLNOVX3Q.SWZXISF9K0MQ@cirno2>
In-Reply-To
<20220726222522.6794-1-krystian@krystianch.com> (view parent)
DKIM signature
missing
Download raw message
himitsu-firefox/patches/.build.yml: FAILED in 16s

[Enable autofilling select elements][0] from [Krystian Chachuła][1]

[0]: https://lists.sr.ht/~sircmpwn/himitsu-devel/patches/34216
[1]: krystian@krystianch.com

✗ #810194 FAILED himitsu-firefox/patches/.build.yml https://builds.sr.ht/~sircmpwn/job/810194
Details
Message ID
<CM6NGAACV8ZD.1IKYYKCFCG6N9@taiga>
In-Reply-To
<20220726222522.6794-1-krystian@krystianch.com> (view parent)
DKIM signature
missing
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/himitsu-firefox
   f9b4069..48131ce  master -> master
Reply to thread Export thread (mbox)