Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 40aa7bc

Browse files
authored
Show textarea when page first loads
I didn't even use an LLM to write this!
1 parent 98408bd commit 40aa7bc

File tree

1 file changed

+6
-0
lines changed
  • word-counter.html

1 file changed

+6
-0
lines changed

word-counter.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
>
23
<html lang="en">
34
<head>
@@ -208,6 +209,11 @@

Word counter

208209
container.appendChild(newSection)
209210
newSection.querySelector('textarea').focus()
210211
})
212+
213+
// Click the button once if there's nothing on the page
214+
if (!document.querySelectorAll('textarea').length) {
215+
addButton.click();
216+
}
211217
script>
212218
body>
213219
html>

0 commit comments

Comments
(0)