-
Notifications
You must be signed in to change notification settings - Fork 308
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
Textarea @var config type #1636
Comments
I think a more universal/compatible solution is to always show a textarea in the config and a button nearby that opens it in a new bigger modal. It'll support and preserve linebreaks, which in other userstyle extensions would be converted into normal whitespace by the |
This may break the compiler. The compiler probably won't work with variables containing |
Well, then we'll save them in an escaped form or by replacing with some special character so that it doesn't break other tools/extensions. |
OTOH this seems to be already handled correctly in usercss-meta: parseStringToEnd calls unquote() that unescapes as well. |
Use case:
For example, https://userstyles.world/style/9719 provides a 'text' var to generate a set of title match rules. Using 'text' means that list looks like
'Game Name 1, Game Name 2, Game Name 3'
in a small single line entry.From what I could tell, supporting a textarea type would be the most expedient way to improve this situation.
I tried to do it myself and got some of the way there, but could not wrap my head around the parser rules and how to handle an unquoted list with newlines. I might be able to finish it if there was some reference for that I could read or explanation of the surrounding system.
Side note, I didn't even know style var/configs existed before now, that's cool.
The text was updated successfully, but these errors were encountered: