Skip to content

Commit 0a185c7

Browse files
committed
linting code with standard
1 parent d407634 commit 0a185c7

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

static/signup.html

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,23 @@ <h2>Finish by issuing credentials in the form of a certificate</h2>
5555

5656
<script type="text/javascript">
5757

58+
document.querySelector('#cert').style.display = 'none'
59+
5860
function createAccount () {
59-
var email = document.querySelector("#email").value
60-
var hostname = location.hostname
61+
var email = document.querySelector('#email').value
6162
var url = '/accounts/new'
62-
var data = "email=" + email;
63+
var data = 'email=' + email
6364

6465
var http = new XMLHttpRequest()
6566
http.open('POST', url)
6667
http.withCredentials = true
67-
http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
68-
http.onreadystatechange = function() {
69-
if (this.readyState !== this.DONE
70-
|| this.status !== 200) {
68+
http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
69+
http.onreadystatechange = function () {
70+
if (this.readyState !== this.DONE ||
71+
this.status !== 200) {
7172
return done(new Error('Request failed'))
7273
}
73-
var webid = this.getResponseHeader("User")
74+
var webid = this.getResponseHeader('User')
7475
if (!webid || webid.length === 0) {
7576
return done(new Error('WebID is not set in User'))
7677
}
@@ -79,7 +80,6 @@ <h2>Finish by issuing credentials in the form of a certificate</h2>
7980
document.querySelector('#your-webid').innerHTML = webid
8081
document.querySelector('#accounts').style.display = 'none'
8182
document.querySelector('#cert').style.display = ''
82-
8383
}
8484
http.send(data)
8585
}
@@ -99,8 +99,6 @@ <h2>Finish by issuing credentials in the form of a certificate</h2>
9999
}
100100
}
101101

102-
document.querySelector('#cert').style.display = 'none'
103-
104102
function done (err) {
105103
if (err) {
106104
console.log(err)

0 commit comments

Comments
 (0)