Skip to content

Commit 46ab1b8

Browse files
space added to regenerate action
1 parent e14568a commit 46ab1b8

File tree

1 file changed

+51
-23
lines changed

1 file changed

+51
-23
lines changed

examples/js-sdk/views/index.html

Lines changed: 51 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
let callbackCounter = 0;
1313

1414
function updateGuiElements(state) {
15-
$("#targeted_advertising_ready").html(__uid2.getAdvertisingToken() ? "yes" : "no");
16-
$("#advertising_token").html(String(__uid2.getAdvertisingToken()));
17-
$("#login_required").html(__uid2.isLoginRequired() ? "yes" : "no");
18-
$("#update_counter").html(callbackCounter);
19-
$("#identity_state").html(String(JSON.stringify(state, null, 2)));
15+
$('#targeted_advertising_ready').html(__uid2.getAdvertisingToken() ? 'yes' : 'no');
16+
$('#advertising_token').html(String(__uid2.getAdvertisingToken()));
17+
$('#login_required').html(__uid2.isLoginRequired() ? 'yes' : 'no');
18+
$('#update_counter').html(callbackCounter);
19+
$('#identity_state').html(String(JSON.stringify(state, null, 2)));
2020

2121
if (__uid2.isLoginRequired()) {
22-
$("#login_form").show();
23-
$("#logout_form").hide();
22+
$('#login_form').show();
23+
$('#logout_form').hide();
2424
} else {
25-
$("#login_form").hide();
26-
$("#logout_form").show();
25+
$('#login_form').hide();
26+
$('#logout_form').show();
2727
}
2828
}
2929

@@ -32,35 +32,63 @@
3232
updateGuiElements(state);
3333
}
3434

35-
$("#logout").click(() => {
35+
$('#logout').click(() => {
3636
__uid2.disconnect();
3737
updateGuiElements(undefined);
3838
});
3939

4040
updateGuiElements(undefined);
4141

4242
__uid2.init({
43-
baseUrl: "<%- uid2BaseUrl %>"
43+
baseUrl: '<%- uid2BaseUrl %>',
4444
});
45+
4546
__uid2.callbacks.push(onUid2IdentityUpdated);
4647
});
4748
</script>
4849
</head>
4950
<body>
5051
<%- include('intro.html'); -%>
5152
<table id="uid2_state">
52-
<tr><td class="label">Ready for Targeted Advertising:</td><td class="value"><pre id="targeted_advertising_ready"></pre></td></tr>
53-
<tr><td class="label">UID2 Advertising Token:</td><td class="value"><pre id="advertising_token"></pre></td></tr>
54-
<tr><td class="label">Is UID2 Login Required?</td><td class="value"><pre id="login_required"></pre></td></tr>
55-
<tr><td class="label">UID2 Identity Updated Counter:</td><td class="value"><pre id="update_counter"></pre></td></tr>
56-
<tr><td class="label">UID2 Identity Callback State:</td><td class="value"><pre id="identity_state"></pre></td></tr>
53+
<tr>
54+
<td class="label">Ready for Targeted Advertising:</td>
55+
<td class="value"><pre id="targeted_advertising_ready"></pre></td>
56+
</tr>
57+
<tr>
58+
<td class="label">UID2 Advertising Token:</td>
59+
<td class="value"><pre id="advertising_token"></pre></td>
60+
</tr>
61+
<tr>
62+
<td class="label">Is UID2 Login Required?</td>
63+
<td class="value"><pre id="login_required"></pre></td>
64+
</tr>
65+
<tr>
66+
<td class="label">UID2 Identity Updated Counter:</td>
67+
<td class="value"><pre id="update_counter"></pre></td>
68+
</tr>
69+
<tr>
70+
<td class="label">UID2 Identity Callback State:</td>
71+
<td class="value"><pre id="identity_state"></pre></td>
72+
</tr>
5773
</table>
58-
<div id="login_form" style="display:none" class="form"><form action="/login" method="POST">
59-
<div class="email_prompt"><input type="text" id="email" name="email" placeholder="Enter an email address" style="border-style: none;"></div>
60-
<div><input type="submit" value="Log In" class="button"></div>
61-
</form></div>
62-
<div id="logout_form" style="display:none" class="form"><form>
63-
<button type="button" class="button" id="logout">Log Out</button>
64-
</form></div>
74+
<div id="login_form" style="display: none" class="form">
75+
<form action="/login" method="POST">
76+
<div class="email_prompt">
77+
<input
78+
type="text"
79+
id="email"
80+
name="email"
81+
placeholder="Enter an email address"
82+
style="border-style: none"
83+
/>
84+
</div>
85+
<div><input type="submit" value="Log In" class="button" /></div>
86+
</form>
87+
</div>
88+
<div id="logout_form" style="display: none" class="form">
89+
<form>
90+
<button type="button" class="button" id="logout">Log Out</button>
91+
</form>
92+
</div>
6593
</body>
6694
</html>

0 commit comments

Comments
 (0)