Prefill username field for guests with query param, Resolves #43

This commit is contained in:
Jeremy Zhang 2017-08-30 18:48:26 +00:00
parent a0a0f01655
commit 9e494f3808
2 changed files with 9 additions and 0 deletions

View File

@ -234,6 +234,10 @@
}
});
if (getParameterByName("username")) {
$("#custom_username_field").val(getParameterByName("username"));
}
if (getParameterByName("forcefocus") == "1") {
if (document.hasFocus()) {
primeEmbed();

View File

@ -42,6 +42,11 @@
<hr>
<em>Eg: theme=DiscordDark</em>
</li>
<li class="collection-item">
<strong>username=&lt;string&gt;</strong> <br>
Prefills the guest username field with the given username. <br>
<em>Eg: username=Rainbow%20Dash</em>
</li>
</ul>
</div>
</div>