twitch addon
This commit is contained in:
parent
2cd7af98a1
commit
07de7179c9
254 changed files with 18420 additions and 1 deletions
26
addons/very-simple-twitch/public/index.html
Normal file
26
addons/very-simple-twitch/public/index.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv='cache-control' content='no-cache'>
|
||||
<meta http-equiv='expires' content='0'>
|
||||
<meta http-equiv='pragma' content='no-cache'>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<h1 id="title">Login...</h1>
|
||||
|
||||
<script>
|
||||
(async () => {
|
||||
const AUTH_URL = 'http://localhost:8090';
|
||||
const hashKeyValue = location.hash.replace('#', '&').split('&');
|
||||
const tokenKeyValue = hashKeyValue.find((item) => item.split('=')[0] === 'access_token');
|
||||
const token = tokenKeyValue.split('=')[1];
|
||||
fetch(AUTH_URL + `?token=${token}`, { method: 'POST' }).then((e) => {document.getElementById("title").innerHTML = "Everything seems to be OK. You can close this window.";} ).catch((error) => {document.getElementById("title").innerHTML = "ERROR: "+JSON.stringify(error);});
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue