-
Notifications
You must be signed in to change notification settings - Fork 0
/
developer-cookies.html
31 lines (27 loc) · 1.25 KB
/
developer-cookies.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js"></script>
<script>
const IDP_TOKEN_COOKIE_NAME = "idp_token";
const THEUSHER_TOKEN_COOKIE_NAME = "theusher_token";
function setDeveloperCookies() {
const idptoken = document.getElementById('idp_token_textarea').value
const ushtoken = document.getElementById('theusher_token_textarea').value
if (idptoken.length > 100) Cookies.set(IDP_TOKEN_COOKIE_NAME, idptoken);
if (ushtoken.length > 100) Cookies.set(THEUSHER_TOKEN_COOKIE_NAME, ushtoken);
}
function clearDeveloperCookies() {
Cookies.remove(IDP_TOKEN_COOKIE_NAME);
Cookies.remove(THEUSHER_TOKEN_COOKIE_NAME);
}
</script>
</head>
<form>
<table boder=1>
<tr><td>idp_token:</td><td> <textarea id=idp_token_textarea></textarea></td></tr>
<tr><td>theusher_token:</td><td> <textarea id=theusher_token_textarea></textarea></td></tr>
<tr><td colspan=2><input type=button name=SetCookies value="Set Token Cookies" onclick="javascript:setDeveloperCookies();"></td></tr>
<tr><td colspan=2><input type=button name=ClearCookies value="Clear Token Cookies" onclick="javascript:clearDeveloperCookies();"></td></tr>
</table>
</form>
</html>