Run prettier on demo

This commit is contained in:
Yarmo Mackenbach 2020-11-08 02:05:23 +01:00
parent 889c7a9f8b
commit 52227e5cee

View file

@ -1,11 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" dir="ltr"> <html lang="en" dir="ltr">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<title>doip.js browser demo</title> <title>doip.js browser demo</title>
</head> </head>
<body> <body>
<h1>doip.js browser demo</h1> <h1>doip.js browser demo</h1>
<div id="claims"> <div id="claims">
@ -18,11 +17,15 @@
<pre class="claim_output"></pre> <pre class="claim_output"></pre>
</div> </div>
<div> <div>
<h2 class="claim_input">https://twitter.com/alice/status/1234567890123456789</h2> <h2 class="claim_input">
https://twitter.com/alice/status/1234567890123456789
</h2>
<pre class="claim_output"></pre> <pre class="claim_output"></pre>
</div> </div>
<div> <div>
<h2 class="claim_input">https://www.reddit.com/user/Alice/comments/123456/post</h2> <h2 class="claim_input">
https://www.reddit.com/user/Alice/comments/123456/post
</h2>
<pre class="claim_output"></pre> <pre class="claim_output"></pre>
</div> </div>
<div> <div>
@ -50,7 +53,6 @@
<pre class="claim_output"></pre> <pre class="claim_output"></pre>
</div> </div>
</div> </div>
</body> </body>
<script src="../dist/doip.min.js" charset="utf-8"></script> <script src="../dist/doip.min.js" charset="utf-8"></script>
@ -59,12 +61,20 @@
const claims = document.querySelectorAll('#claims > div') const claims = document.querySelectorAll('#claims > div')
claims.forEach(async (item, i) => { claims.forEach(async (item, i) => {
claimInput = item.querySelector('.claim_input').textContent claimInput = item.querySelector('.claim_input').textContent
item.querySelector('.claim_output').textContent = JSON.stringify(await doip.verify(claimInput, null, { 'returnMatchesOnly': true, 'xmppVcardServerDomain': 'vcard.server.org' }), null, 2) item.querySelector('.claim_output').textContent = JSON.stringify(
await doip.verify(claimInput, null, {
returnMatchesOnly: true,
xmppVcardServerDomain: 'vcard.server.org',
}),
null,
2
)
}) })
}) })
</script> </script>
<style> <style>
h1, h2 { h1,
h2 {
text-align: center; text-align: center;
} }
#claims > div { #claims > div {