Closed colejd closed 4 years ago
I wanted to go with curly brackets, but I went with square brackets since they don't break your URL validation. If you want curly brackets, we need to change things so that Defaults[.url]
doesn't hold a URL, but instead something that allows for characters that are invalid in a normal URL. Would that be preferable?
Thanks for working on this. 🙌🏻
I'm fine with using brackets. Can you make it [[screenWidth]]
, just to ensure it doesn't clash with any normal URLs. [screenWidth]
could potentially clash in some search parameters.
This needs to be quickly documented in the readme too.
@sindresorhus Okay, I think I've addressed all of your comments. I've changed it so double-brackets are used; I've also generalized the placeholder code, which should give you some added flexibility in the future.
Please have another look when convenient.
Okay, I think I've addressed everything in this round @sindresorhus. Ready for more review.
Another round of updates for you @sindresorhus.
I noticed one last thing. In the menu and tooltip here it should show either the decoded URL or the final URL after replacements. I'm leaning towards the final URL. Thoughts?
I think showing the final URL would make sense. Do you know where that value gets populated?
Can you fix the merge conflict? addInfoMenuItem
was moved to a different file in master.
This looks good otherwise.
Fixed!
Thanks for contributing. This is really good 🙌🏻
Thank you!
This PR adds support for [screenWidth] and [screenHeight] placeholders when specifying a URL in the "Open URL..." menu. The values will automatically get swapped out for the actual size.
Closes #6.