~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] content: also try [autocomplete] to find inputs

Details
Message ID
<20240717095520.7343-1-alamica@protonmail.com>
DKIM signature
pass
Download raw message
Patch: +10 -2
Some websites (such as proton mail) don't use the [name] attribute
which caused autofill to fail.
---
 content/content.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/content/content.js b/content/content.js
index bbd15eb..73b657d 100644
--- a/content/content.js
+++ b/content/content.js
@@ -15,7 +15,7 @@ function handleAutofill(msg) {
		if (pair.key === "proto" || pair.key === "host") {
			return;
		};
		const input = form.querySelector(`input[name="${pair.key}"]`);
		const input = findInput(form, pair.key);
		input.click();
		input.focus();
		input.value = pair.value;
@@ -40,7 +40,7 @@ function findForm(key) {
			if (pair.optional) {
				return;
			}
			const input = form.querySelector(`input[name="${pair.key}"]`);
			const input = findInput(form, pair.key);
			if (input === null) {
				valid = false;
			}
@@ -51,3 +51,11 @@ function findForm(key) {
	}
	return null;
}

function findInput(elem, key) {
	const input = elem.querySelector(`input[name="${key}"]`);
	if (input !== null) {
		return input;
	}
	return elem.querySelector(`input[autocomplete="${key}"]`);
}
-- 
2.45.2

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

builds.sr.ht <builds@sr.ht>
Details
Message ID
<D2RQ3UU3EXCE.27ERJERBTRZZX@fra01>
In-Reply-To
<20240717095520.7343-1-alamica@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
himitsu-firefox/patches/.build.yml: FAILED in 14s

[content: also try [autocomplete] to find inputs][0] from [tiosgz][1]

[0]: https://lists.sr.ht/~sircmpwn/himitsu-devel/patches/53936
[1]: alamica@protonmail.com

✗ #1277921 FAILED himitsu-firefox/patches/.build.yml https://builds.sr.ht/~sircmpwn/job/1277921
Details
Message ID
<D2RZVEOLV4AL.3LUENIY75BNLZ@strohwolke.at>
In-Reply-To
<20240717095520.7343-1-alamica@protonmail.com> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/himitsu-firefox
   dd720ad..1fb4d56  master -> master
Reply to thread Export thread (mbox)