Skip to content

Commit

Permalink
Color for clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
wrose504 committed Mar 22, 2024
1 parent ef9a38c commit 842adee
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions autofill/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@
#debug-area pre.input-event {
background-color: rgb(137, 246, 226);
}

#debug-area pre.click-event {
background-color: rgb(246, 137, 193);
}

#debug-area pre.submit-event {
background-color: rgb(246, 186, 137);
}
</style>
</head>
<body>
Expand All @@ -103,7 +111,14 @@ <h1>Autofill Sucks</h1>
/>
<label for="email">Email:</label>
<input type="email" id="email" name="email" autocomplete="email" />
<button id="submit" type="submit">Submit</button>
<label for="address">Address:</label>
<input
type="address"
id="address"
name="address"
autocomplete="street-address"
/>
<button id="submit-button" type="submit">Submit</button>
</form>

<div id="debug-area"></div>
Expand All @@ -114,7 +129,8 @@ <h1>Autofill Sucks</h1>
const firstName = document.getElementById("first-name");
const lastName = document.getElementById("last-name");
const email = document.getElementById("email");
const submitButton = document.getElementById("submit");
const address = document.getElementById("address");
const submitButton = document.getElementById("submit-button");
const debugArea = document.getElementById("debug-area");

function log(message) {
Expand Down Expand Up @@ -146,7 +162,7 @@ <h1>Autofill Sucks</h1>
report(event);
};

for (const input of [firstName, lastName, email]) {
for (const input of [firstName, lastName, email, address]) {
input.onchange = report;
input.oninput = report;
input.onfocus = report;
Expand Down

0 comments on commit 842adee

Please sign in to comment.