SyntaxFix
Write A Post
Hire A Developer
Questions
This violates DRY principle, but it's a concise solution:
var button = '<a href="{link}" class="btn">{text}</a>'; button = button.replace('{text}','Authorize on GitHub').replace('{link}', authorizeUrl);