Merge pull request #199 from hundt/master
Add URL fragment to sign-in form
commit3a79827af20d2327159a5a35c567519a38297ef4
authorJehiah Czebotar <jehiah@gmail.com>
dateMon 20 Jun 2016, 08:42 (10 years ago)
parentf6778c7f74ad56
templates.go+10
@@ -129,6 +129,16 @@ func getTemplates() *template.Template {
129129 </form>
130130 </div>
131131 {{ end }}
132+ <script>
133+ if (window.location.hash) {
134+ (function() {
135+ var inputs = document.getElementsByName('rd');
136+ for (var i = 0; i < inputs.length; i++) {
137+ inputs[i].value += window.location.hash;
138+ }
139+ })();
140+ }
141+ </script>
132142 <footer>
133143 {{ if eq .Footer "-" }}
134144 {{ else if eq .Footer ""}}