forked from ljsydpwym/StremioCinema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
30 lines (29 loc) · 1.01 KB
/
index.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
<html>
<body>
<div>
<label>Name</label>
<input id="name" type="text" name="name">
<label>Password</label>
<input id="password" type="text" name="password">
<button id="generate" class="btn btn-primary">Generate</button>
<div id="output"></div>
</div>
</body>
<script>
function generate(){
const name = document.getElementById("name").value
const password = document.getElementById("password").value
console.log("raw", name, password)
const base64 = btoa(`${name}:${password}`)
console.log("base64",base64)
const urlEncoded = encodeURIComponent(base64)
console.log("urlEncoded",urlEncoded)
const link = `https://stremio-cinema.vercel.app/1/${urlEncoded}/manifest.json`
document.getElementById("output").innerHTML = `
<div>Enter this link into Stremio -> Addons -> Search addon box</div>
<div>${link}</div>
`
}
document.getElementById("generate").addEventListener("click", generate)
</script>
</html>