Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using placeholder for a hint to enable JavaScript #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jolange
Copy link

@jolange jolange commented Dec 28, 2022

Thanks for this tool! Very nice idea and easy to deploy :-)

Some people (like me) generally have JavaScript blocked, so I felt a hint would be nice to activate it.
This is using placeholder for this purpose, which is reset to "Enter text here." if JavaScript is active. (This could be reset to an empty string if you like that better.)

Before, with JavaScript disabled, you always saw a blank input field, even if you visited a URL with content. Now it shows something like this:
image

this is reset if JavaScript is active
@@ -163,7 +165,7 @@
</script>
</head>
<body>
<div id="plaintext-wrapper"><textarea id="plaintext" spellcheck="false"></textarea></div>
<div id="plaintext-wrapper"><textarea id="plaintext" spellcheck="false" placeholder="Please enable JavaScript."></textarea></div>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support the idea, but the canonical way is to use noscript element.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To change placeholder? I would not know how to without using js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants