Skip to content

Commit 9b87d73

Browse files
simonwclaude
andauthored
Change form field id from 'username' to 'hn-user' to avoid 1Password autofill (#230)
The id="username" attribute caused 1Password to offer username suggestions on the Hacker News username input. Renaming to 'hn-user' avoids that heuristic while keeping the label text and placeholder unchanged. https://claude.ai/code/session_016RkTJdD7FxriPaqmkTqG6y Co-authored-by: Claude <noreply@anthropic.com>
1 parent 98151f8 commit 9b87d73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hn-comments-for-user.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<body>
2020
<h1>Hacker News comments for a user</h1>
2121
<div class="controls">
22-
<label for="username">Hacker News username:</label>
23-
<input id="username" type="text" placeholder="e.g., pg" />
22+
<label for="hn-user">Hacker News username:</label>
23+
<input id="hn-user" type="text" placeholder="e.g., pg" />
2424
<button id="fetchBtn">Fetch comments</button>
2525
<button id="copyBtn" disabled>Copy Output</button>
2626
</div>
@@ -29,7 +29,7 @@ <h1>Hacker News comments for a user</h1>
2929
<div id="note"></div>
3030

3131
<script>
32-
const username = document.getElementById('username');
32+
const username = document.getElementById('hn-user');
3333
const fetchBtn = document.getElementById('fetchBtn');
3434
const copyBtn = document.getElementById('copyBtn');
3535
const output = document.getElementById('output');

0 commit comments

Comments
 (0)